The JavaScript Temporal API (tc39/proposal-temporal
) is currently in stage #3.
Does TypeScript require any update to allow the use of the Temporal API, or once it is supported by the target environment (e.g. V8, Deno, Node.js) it can be used in TS as well?
For a proper Web API support, including type checking, TypeScript requires type definitions, which can be added manually by augmenting the global namespace, or one should wait for an official TS update.
A sample of manual type definition:
declare global {
interface Temporal {
//add necessary type definitions here
}
}