microsoft / vscode-json-languageservice

JSON language service extracted from VSCode to be reused, e.g in the Monaco editor.
Other
261 stars 110 forks source link

Deprecate Thenable and alias to PromiseLike #239

Closed remcohaszing closed 1 month ago

remcohaszing commented 2 months ago

TypeScript has a builtin type for promise-like values: PromiseLike. Thenable attempts to achieve the same result, but it has some compatibility issues.

This change aliases Thenable to PromiseLike, to make it compatible with the rest of the TypeScript ecosystem.

Additionally this deprecates Thenable. There is no practical use case for it, but it is confusing to communicate something other than PromiseLike to users. All occurrences of Thenable were replaced with PromiseLike.

aeschli commented 1 month ago

Thanks @remcohaszing !