the tswhy logo: a question mark in a box

tswhy‽

A community effort to enrich TypeScript diagnostics.

TS1055

Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.

1 Fix
Related: TS1064

TS1058

The return type of an async function must either be a valid promise or must not contain a callable 'then' member.

TS1059

A promise must have a 'then' method.

TS1060

The first parameter of the 'then' method of a promise must be a callback.

TS1062

Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method.

TS1064

The return type of an async function or method must be the global Promise<T> type. Did you mean to write 'Promise<{0}>'?

1 Fix
Related: TS1055