# Function Declaration Syntax in TypeScript A function declaration defines a reusable block of logic with typed inputs and output. ## Basic Shape ```ts function greet(name: string): string { return `Hello, ${name}`; } ``` ## Parts Explained - `function`: keyword to declare a function. - `greet`: function name. - `(name: string)`: parameter list with a type annotation. - `: string`: return type annotation. - `{ ... }`: function body. ## Python Comparison ```py def greet(name: str) -> str: return f"Hello, {name}" ``` TypeScript puts type annotations after variable names as `name: string`, similar to Python type hints.