Optional Parameters in Callbacks

This has a very specific meaning: the done callback might be invoked with 1 argument or might be invoked with 2 arguments.
The author probably intended to say that the callback might not care about the elapsedTime parameter,
but there’s no need to make the parameter optional to accomplish this –
it’s always legal to provide a callback that accepts fewer arguments.

Why: It’s always legal for a callback to disregard a parameter, so there’s no need for the shorter overload.
Providing a shorter callback first allows incorrectly-typed functions to be passed in because they match the first overload.

Why: TypeScript chooses the first matching overload when resolving function calls.
When an earlier overload is “more general” than a later one, the later one is effectively hidden and cannot be called.

Use Optional Parameters

Don’t write several overloads that differ only in trailing parameters:

Note that this collapsing should only occur when all overloads have the same return type.

Why: This is important for two reasons.

TypeScript resolves signature compatibility by seeing if any signature of the target can be invoked with the arguments of the source,
and extraneous arguments are allowed.
This code, for example, exposes a bug only when the signature is correctly written using optional parameters:

The second reason is when a consumer uses the “strict null checking” feature of TypeScript.
Because unspecified parameters appear as undefined in JavaScript, it’s usually fine to pass an explicit undefined to a function with optional arguments.
This code, for example, should be OK under strict nulls:

var x: Example;
// When written with overloads, incorrectly an error because of passing 'undefined' to 'string'
// When written with optionals, correctly OK
x.diff("something", true ? undefined : "hour");

Use Union Types

Don’t write overloads that differ by type in only one argument position: