Advanced TypeScript
Q91 / 100

How does TypeScript resolve overload resolution order when multiple overload signatures could match a call?

Correct! Well done.

Incorrect.

The correct answer is B) It picks the first overload signature (in declaration order) that matches the call, so more specific overloads should be listed first

B

Correct Answer

It picks the first overload signature (in declaration order) that matches the call, so more specific overloads should be listed first

Explanation

TypeScript checks overload signatures in the order they are written and uses the first one that matches, so specific overloads must precede more general ones.

Progress
91/100