TypeScript · Type Checking

strictFunctionTypes

When assigning functions, check to ensure parameters and the return values are subtype-compatible.

Syntax
"strictFunctionTypes": true

Example

Example
{
  "compilerOptions": {
    "strictFunctionTypes": true
  }
}

More in this group

allowUnreachableCode allowUnusedLabels alwaysStrict noFallthroughCasesInSwitch noImplicitAny noImplicitOverride noImplicitReturns noImplicitThis

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course