fix: future proof for ts6#5616
Open
kobenguyent wants to merge 1 commit into
Open
Conversation
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.
Motivation/Description of the PR
100% safe tsconfig.json with both TypeScript 5 and TypeScript 6. This configuration currently sits perfectly in the "sweet spot" for cross-version compatibility. Here is why:
No v6-Exclusive Flags: haven't included any brand-new compiler options that only exist in TypeScript 6. Everything in file has been stable and fully supported throughout the TS 5 lifecycle (and in many cases, since TS 4.7+).
No Deprecated Flags: not relying on any legacy settings that TS 5 allowed but TS 6 throws errors for (such as preserveValueImports or legacy "node" resolution).
Explicit Overrides: explicitly defined settings like "types": ["node"] and "strictNullChecks": true, that insulates the project from the default behavior changes between the two versions. In TS 5, it behaves exactly as specified; in TS 6, it continues to behave exactly as specified rather than falling back to the new defaults.
The project will compile identically regardless of whether a machine resolves typescript@5.x or typescript@6.x from the package manager.
Type of change
Checklist:
npm run docs)npm run lint)npm test)