TypeScript Syntax and Type Operators
Call signature — callable object type
A call signature describes how a value can be invoked within an object type. Unlike a simple function type expression, the surrounding object can also declare properties or multiple signatures. The signature is checked structurally against callable values; declaring it does not implement a function. The colon before the return type distinguishes this object-member syntax from a function type arrow. Example output: "id #4". Tested in the strict TypeScript 5.8.3 / ES2022 baseline; the example is not a runtime type validator.
Formal Syntax & Structure
typescript syntaxtypescript
type Formatter = { (value: number): string; label: string };Working Example
Example Snippettypescript
type Formatter = { (value: number): string; label: string };const format: Formatter = Object.assign((n: number) => `#${n}`, { label: "id" });console.log(format.label, format(4));