the tswhy logo: a question mark in a box

tswhy‽

A community effort to enrich TypeScript diagnostics.

TS1035

Only ambient modules can use quoted names.

TS1036

Statements are not allowed in ambient contexts.

TS1038

A 'declare' modifier cannot be used in an already ambient context.

TS1039

Initializers are not allowed in ambient contexts.

TS1040

'{0}' modifier cannot be used in an ambient context.

TS1044

'{0}' modifier cannot appear on a module or namespace element.

TS1046

Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

TS1059

A promise must have a 'then' method.

TS1060

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

TS1061

Enum member must have initializer.

TS1063

An export assignment cannot be used in a namespace.

TS1070

'{0}' modifier cannot appear on a type member.

TS1071

'{0}' modifier cannot appear on an index signature.

TS1079

A '{0}' modifier cannot be used with an import declaration.

TS1084

Invalid 'reference' directive syntax.