Skip to content

Commit

Permalink
Switch to TS 5.7 (#3301)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey authored Jan 17, 2025
1 parent 2ff9097 commit 0e6f3a0
Show file tree
Hide file tree
Showing 10 changed files with 321 additions and 281 deletions.
2 changes: 2 additions & 0 deletions .changeset/mean-jars-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@types/eslint": "7.29.0",
"assert": "2.0.0",
"rollup-plugin-typescript2": "0.34.1",
"typescript": "5.6.2",
"typescript": "5.7.3",
"tslib": "^2.6.2",
"prettier": "^2.0.2",
"sharp": "0.28.1"
Expand Down
109 changes: 60 additions & 49 deletions packages/documentation/copy/en/project-config/Compiler Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -1249,267 +1249,278 @@ tsc app.ts util.ts --target esnext --outfile index.js
<p>Use the package.json 'imports' field when resolving imports.</p>
</td></tr>

<tr class='odd' name='rootDir'>
<tr class='odd' name='rewriteRelativeImportExtensions'>
<td><code><a href='/tsconfig/#rewriteRelativeImportExtensions'>--rewriteRelativeImportExtensions</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<p>Does something</p>
</td></tr>

<tr class='even' name='rootDir'>
<td><code><a href='/tsconfig/#rootDir'>--rootDir</a></code></td>
<td><p><code>string</code></p>
</td>
<td><p>Computed from the list of input files.</p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Specify the root folder within your source files.</p>
</td></tr>

<tr class='even' name='rootDirs'>
<tr class='odd' name='rootDirs'>
<td><code><a href='/tsconfig/#rootDirs'>--rootDirs</a></code></td>
<td><p><code>list</code></p>
</td>
<td><p>Computed from the list of input files.</p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Allow multiple folders to be treated as one when resolving modules.</p>
</td></tr>

<tr class='odd' name='skipDefaultLibCheck'>
<tr class='even' name='skipDefaultLibCheck'>
<td><code><a href='/tsconfig/#skipDefaultLibCheck'>--skipDefaultLibCheck</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Skip type checking .d.ts files that are included with TypeScript.</p>
</td></tr>

<tr class='even' name='skipLibCheck'>
<tr class='odd' name='skipLibCheck'>
<td><code><a href='/tsconfig/#skipLibCheck'>--skipLibCheck</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Skip type checking all .d.ts files.</p>
</td></tr>

<tr class='odd' name='sourceMap'>
<tr class='even' name='sourceMap'>
<td><code><a href='/tsconfig/#sourceMap'>--sourceMap</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Create source map files for emitted JavaScript files.</p>
</td></tr>

<tr class='even' name='sourceRoot'>
<tr class='odd' name='sourceRoot'>
<td><code><a href='/tsconfig/#sourceRoot'>--sourceRoot</a></code></td>
<td><p><code>string</code></p>
</td>
<td>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Specify the root path for debuggers to find the reference source code.</p>
</td></tr>

<tr class='odd' name='stopBuildOnErrors'>
<tr class='even' name='stopBuildOnErrors'>
<td><code><a href='/tsconfig/#stopBuildOnErrors'>--stopBuildOnErrors</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Skip building downstream projects on error in upstream project.</p>
</td></tr>

<tr class='even' name='strict'>
<tr class='odd' name='strict'>
<td><code><a href='/tsconfig/#strict'>--strict</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Enable all strict type-checking options.</p>
</td></tr>

<tr class='odd' name='strictBindCallApply'>
<tr class='even' name='strictBindCallApply'>
<td><code><a href='/tsconfig/#strictBindCallApply'>--strictBindCallApply</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>true</code> if <a href="#strict"><code>strict</code></a>; <code>false</code> otherwise.</p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Check that the arguments for <code>bind</code>, <code>call</code>, and <code>apply</code> methods match the original function.</p>
</td></tr>

<tr class='even' name='strictBuiltinIteratorReturn'>
<tr class='odd' name='strictBuiltinIteratorReturn'>
<td><code><a href='/tsconfig/#strictBuiltinIteratorReturn'>--strictBuiltinIteratorReturn</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code>, unless <code>strict</code> is set</p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Built-in iterators are instantiated with a TReturn type of undefined instead of any.</p>
</td></tr>

<tr class='odd' name='strictFunctionTypes'>
<tr class='even' name='strictFunctionTypes'>
<td><code><a href='/tsconfig/#strictFunctionTypes'>--strictFunctionTypes</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>true</code> if <a href="#strict"><code>strict</code></a>; <code>false</code> otherwise.</p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>When assigning functions, check to ensure parameters and the return values are subtype-compatible.</p>
</td></tr>

<tr class='even' name='strictNullChecks'>
<tr class='odd' name='strictNullChecks'>
<td><code><a href='/tsconfig/#strictNullChecks'>--strictNullChecks</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>true</code> if <a href="#strict"><code>strict</code></a>; <code>false</code> otherwise.</p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>When type checking, take into account <code>null</code> and <code>undefined</code>.</p>
</td></tr>

<tr class='odd' name='strictPropertyInitialization'>
<tr class='even' name='strictPropertyInitialization'>
<td><code><a href='/tsconfig/#strictPropertyInitialization'>--strictPropertyInitialization</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>true</code> if <a href="#strict"><code>strict</code></a>; <code>false</code> otherwise.</p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Check for class properties that are declared but not set in the constructor.</p>
</td></tr>

<tr class='even' name='stripInternal'>
<tr class='odd' name='stripInternal'>
<td><code><a href='/tsconfig/#stripInternal'>--stripInternal</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Disable emitting declarations that have <code>@internal</code> in their JSDoc comments.</p>
</td></tr>

<tr class='odd' name='suppressExcessPropertyErrors'>
<tr class='even' name='suppressExcessPropertyErrors'>
<td><code><a href='/tsconfig/#suppressExcessPropertyErrors'>--suppressExcessPropertyErrors</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Disable reporting of excess property errors during the creation of object literals.</p>
</td></tr>

<tr class='even' name='suppressImplicitAnyIndexErrors'>
<tr class='odd' name='suppressImplicitAnyIndexErrors'>
<td><code><a href='/tsconfig/#suppressImplicitAnyIndexErrors'>--suppressImplicitAnyIndexErrors</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Suppress <a href="#noImplicitAny"><code>noImplicitAny</code></a> errors when indexing objects that lack index signatures.</p>
</td></tr>

<tr class='odd' name='target'>
<tr class='even' name='target'>
<td><code><a href='/tsconfig/#target'>--target</a></code></td>
<td><p><code>es3</code>, <code>es5</code>, <code>es6</code>/<code>es2015</code>, <code>es2016</code>, <code>es2017</code>, <code>es2018</code>, <code>es2019</code>, <code>es2020</code>, <code>es2021</code>, <code>es2022</code>, <code>es2023</code>, or <code>esnext</code></p>
<td><p><code>es3</code>, <code>es5</code>, <code>es6</code>/<code>es2015</code>, <code>es2016</code>, <code>es2017</code>, <code>es2018</code>, <code>es2019</code>, <code>es2020</code>, <code>es2021</code>, <code>es2022</code>, <code>es2023</code>, <code>es2024</code>, or <code>esnext</code></p>
</td>
<td><p><code>ES5</code></p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Set the JavaScript language version for emitted JavaScript and include compatible library declarations.</p>
</td></tr>

<tr class='even' name='traceResolution'>
<tr class='odd' name='traceResolution'>
<td><code><a href='/tsconfig/#traceResolution'>--traceResolution</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Log paths used during the <a href="#moduleResolution"><code>moduleResolution</code></a> process.</p>
</td></tr>

<tr class='odd' name='tsBuildInfoFile'>
<tr class='even' name='tsBuildInfoFile'>
<td><code><a href='/tsconfig/#tsBuildInfoFile'>--tsBuildInfoFile</a></code></td>
<td><p><code>string</code></p>
</td>
<td><p><code>.tsbuildinfo</code></p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>The file to store <code>.tsbuildinfo</code> incremental build information in.</p>
</td></tr>

<tr class='even' name='typeRoots'>
<tr class='odd' name='typeRoots'>
<td><code><a href='/tsconfig/#typeRoots'>--typeRoots</a></code></td>
<td><p><code>list</code></p>
</td>
<td>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Specify multiple folders that act like <code>./node_modules/@types</code>.</p>
</td></tr>

<tr class='odd' name='types'>
<tr class='even' name='types'>
<td><code><a href='/tsconfig/#types'>--types</a></code></td>
<td><p><code>list</code></p>
</td>
<td>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Specify type package names to be included without being referenced in a source file.</p>
</td></tr>

<tr class='even' name='useDefineForClassFields'>
<tr class='odd' name='useDefineForClassFields'>
<td><code><a href='/tsconfig/#useDefineForClassFields'>--useDefineForClassFields</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>true</code> if <a href="#target"><code>target</code></a> is <code>ES2022</code> or higher, including <code>ESNext</code>; <code>false</code> otherwise.</p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Emit ECMAScript-standard-compliant class fields.</p>
</td></tr>

<tr class='odd' name='useUnknownInCatchVariables'>
<tr class='even' name='useUnknownInCatchVariables'>
<td><code><a href='/tsconfig/#useUnknownInCatchVariables'>--useUnknownInCatchVariables</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>true</code> if <a href="#strict"><code>strict</code></a>; <code>false</code> otherwise.</p>
</td>
</tr>
<tr class="option-description odd"><td colspan="3">
<tr class="option-description even"><td colspan="3">
<p>Default catch clause variables as <code>unknown</code> instead of <code>any</code>.</p>
</td></tr>

<tr class='even' name='verbatimModuleSyntax'>
<tr class='odd' name='verbatimModuleSyntax'>
<td><code><a href='/tsconfig/#verbatimModuleSyntax'>--verbatimModuleSyntax</a></code></td>
<td><p><code>boolean</code></p>
</td>
<td><p><code>false</code></p>
</td>
</tr>
<tr class="option-description even"><td colspan="3">
<tr class="option-description odd"><td colspan="3">
<p>Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.</p>
</td></tr>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

Got TS2015 for target but it is not a supported value by the TS compiler.

Allowed values: es3,es5,es6,es2015,es2016,es2017,es2018,es2019,es2020,es2021,es2022,es2023,esnext
Allowed values: es3,es5,es6,es2015,es2016,es2017,es2018,es2019,es2020,es2021,es2022,es2023,es2024,esnext
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
display: "rewriteRelativeImportExtensions"
oneline: "Does something"
---
Rewrite .ts, .tsx, .mts, and .cts file extensions in relative import paths to their JavaScript equivalent in output files.

3 changes: 2 additions & 1 deletion packages/tsconfig-reference/data/_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export type CompilerOptionName =
| "version"
| "init"
| "project"
| "build"
| "showConfig"
| "listFilesOnly"
| "target"
Expand Down Expand Up @@ -79,6 +78,7 @@ export type CompilerOptionName =
| "allowUmdGlobalAccess"
| "moduleSuffixes"
| "allowImportingTsExtensions"
| "rewriteRelativeImportExtensions"
| "resolvePackageJsonExports"
| "resolvePackageJsonImports"
| "customConditions"
Expand Down Expand Up @@ -132,6 +132,7 @@ export type CompilerOptionName =
| "synchronousWatchDirectory"
| "excludeDirectories"
| "excludeFiles"
| "build"
| "verbose"
| "dry"
| "force"
Expand Down
Loading

0 comments on commit 0e6f3a0

Please sign in to comment.