feat(skeleton): source Temporal types from TypeScript lib entries - #4
Open
DASPRiD wants to merge 1 commit into
Open
feat(skeleton): source Temporal types from TypeScript lib entries#4DASPRiD wants to merge 1 commit into
DASPRiD wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
temporal-polyfill 1.x split its global type declarations off the runtime entry:
temporal-polyfill/globalstill installs the runtime global but its declaration file is empty, with the ambient types moved totemporal-polyfill/types/global. The skeleton currently opts in via a triple-slash reference to that path invite-env.d.ts.TypeScript 6+ ships the Temporal proposal's declarations natively, split across three lib files:
ESNext.Temporal: theTemporalnamespaceESNext.Intl:Intl.DateTimeFormataccepting Temporal valuesESNext.Date:Date.prototype.toTemporalInstant()This switches the skeleton to those official lib entries and drops the polyfill types reference. The base
ES2023/DOMentries are restated becauseextendsreplaces thelibarray wholesale rather than merging it.The conditional runtime polyfill load in
entry.tsis 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.