microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
101.18k stars 12.51k forks source link

Add Temporal (Stage 3) types #60164

Open milkcask opened 1 month ago

milkcask commented 1 month ago

⚙ Compilation target

ESNext

⚙ Library

n/a

Missing / Incorrect Definition

Sample Code

const now = Temporal.Now.instant();
const past = Temporal.Instant.from('1969-07-20T20:17Z');

Documentation Link

https://tc39.es/proposal-temporal/docs/index.html

The API itself is quite stable. It is calendar that is blocking implementation.

ooker777 commented 1 month ago

FYI: Deno has implemented it quite long ago: Temporal - Web - Deno Docs