Update documentation for TypeScript 6.0 compiler option changes#3563
Open
5cover wants to merge 14 commits into
Open
Update documentation for TypeScript 6.0 compiler option changes#35635cover wants to merge 14 commits into
5cover wants to merge 14 commits into
Conversation
added 14 commits
May 1, 2026 15:10
Author
|
@microsoft-github-policy-service agree |
rdsalcedo
reviewed
Jun 18, 2026
Comment on lines
362
to
367
| Notice two things here: | ||
|
|
||
| 1. Our `person` and `date` parameters no longer have type annotations. | ||
| 2. Our "template string" - that string that used backticks (the `` ` `` character) - was converted to plain strings with concatenations. | ||
|
|
||
| More on that second point later, but let's now focus on that first point. |
There was a problem hiding this comment.
Replace these 6 lines with:
Notice that our person and date parameters no longer have type annotations.
rdsalcedo
reviewed
Jun 18, 2026
|
|
||
| > **Remember**: Type annotations never change the runtime behavior of your program. | ||
|
|
||
| ## Downleveling |
There was a problem hiding this comment.
Since this downleveling no longer happens by default, maybe this section should be removed. If not then it should at least explain that this only happens if you specify a target of ES5 and doing so results in error TS5107
rdsalcedo
reviewed
Jun 18, 2026
rdsalcedo
left a comment
There was a problem hiding this comment.
I just started reading the handbook and noticed some of the out of date stuff in Basics.md . I found this pull request that addresses part of what I noticed, so that is the only file that I commented on.
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.
This PR updates TypeScript Website documentation to match the TypeScript 6.0 compiler option defaults, removals, and deprecations described in the 6.0 release notes.
The main goal is to remove stale guidance that describes TypeScript 5.x behavior as the current default. In particular, the docs now make clear that projects should explicitly opt into global
@typespackages, modern module resolution and emit settings, and supported ECMAScript targets.Rationale
TypeScript 6.0 changes several long-standing defaults and deprecates older compiler behaviors. Some existing docs still described the previous behavior as current, which could lead users to:
node_modules/@typespackages to be loaded automatically;rootDir,module,target, and interop defaults from older TypeScript versions;tsconfig.jsonto be ignored;target: ES5,outFile, legacy namespacemodulesyntax, orno-default-libdirectives.This PR aligns the current reference, handbook, project config, and tutorial content with TypeScript 6.0 while preserving historical release notes.
Changes
typesandtypeRootsdocumentation for the newtypes: []default, including thetypes: ["*"]escape hatch for the old visible-@typesenumeration behavior.rootDirand relatedoutDirdocs for the TypeScript 6.0 default of the directory containing thetsconfig.json.strict,module,target,noUncheckedSideEffectImports, andlibReplacement.DOMnow includes the declarations previously split acrossDOM.IterableandDOM.AsyncIterable.downlevelIterationas deprecated because it only affects ES5 emit.node/node10,classic, andbaseUrl, including migration guidance towardpaths,nodenext, andbundler.none, andoutFileworkflows, steering users toward external bundlers.esModuleInterop,allowSyntheticDefaultImports, andalwaysStrict.module X {}namespace syntax as deprecated while keepingnamespace X {}documented./// <reference no-default-lib="true"/>as deprecated and recommendnoLibinstead.tsconfig.jsonwould otherwise be loaded unless--ignoreConfigis used.Validation