Skip to content

feat(skeleton): source Temporal types from TypeScript lib entries - #4

Open
DASPRiD wants to merge 1 commit into
mainfrom
feat/temporal-lib-types
Open

feat(skeleton): source Temporal types from TypeScript lib entries#4
DASPRiD wants to merge 1 commit into
mainfrom
feat/temporal-lib-types

Conversation

@DASPRiD

@DASPRiD DASPRiD commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

temporal-polyfill 1.x split its global type declarations off the runtime entry: temporal-polyfill/global still installs the runtime global but its declaration file is empty, with the ambient types moved to temporal-polyfill/types/global. The skeleton currently opts in via a triple-slash reference to that path in vite-env.d.ts.

TypeScript 6+ ships the Temporal proposal's declarations natively, split across three lib files:

  • ESNext.Temporal: the Temporal namespace
  • ESNext.Intl: Intl.DateTimeFormat accepting Temporal values
  • ESNext.Date: Date.prototype.toTemporalInstant()

This switches the skeleton to those official lib entries and drops the polyfill types reference. The base ES2023/DOM entries are restated because extends replaces the lib array wholesale rather than merging it.

The conditional runtime polyfill load in entry.ts is unchanged. It typechecks against the (deliberately empty) declaration of the runtime entry.

Verified via pnpm test-synth: the generated project typechecks (tsc --noEmit) and builds.

temporal-polyfill 1.x no longer declares global types on its runtime
entry, and TypeScript 6+ ships the Temporal proposal's declarations as
ESNext.Temporal, ESNext.Intl and ESNext.Date. Set those in the
skeleton's lib (restating the base entries, since extends replaces the
array wholesale) and drop the polyfill types reference from
vite-env.d.ts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant