Advanced TypeScript
Q97 / 100

What is the difference between "Function" type and a specific function signature like "(a: number) => void" for type safety?

Correct! Well done.

Incorrect.

The correct answer is B) The "Function" type only guarantees a callable value (like any function), losing parameter and return type information, whereas a specific signature enforces exact call shapes

B

Correct Answer

The "Function" type only guarantees a callable value (like any function), losing parameter and return type information, whereas a specific signature enforces exact call shapes

Explanation

The generic "Function" type accepts any callable but provides no information about parameters or return values, making it far less type-safe than a precise function type.

Progress
97/100