-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Deprecate alwaysStrict: false in TypeScript 6.0 #63030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 3 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7858bec
Initial plan
Copilot 6a17477
Add deprecation warning for alwaysStrict: false
Copilot e6282ce
Accept baseline for tscWatch test with alwaysStrict deprecation
Copilot 9144da6
Add ignoreDeprecations to test to silence alwaysStrict warning
Copilot 6327013
Detach alwaysStrict from strict
RyanCavanaugh 043e50c
Add `@strict: true` to a few tests.
DanielRosenwasser f96c058
Accepted baselines.
DanielRosenwasser 1740b80
Adjust some fourslash tests.
DanielRosenwasser 5210752
Accepted baselines.
DanielRosenwasser 1e676f0
Specify `@strict: false` on lots of tests that would fail under `noIm…
DanielRosenwasser 178a0e0
Disable strict for test that mentions widening.
DanielRosenwasser b572d15
Default `--strict` to `true`.
DanielRosenwasser fb5f832
Accepted baselines.
DanielRosenwasser 5d82260
Adjust fourslash test that fails under `strictNullChecks`.
DanielRosenwasser ef5ead1
Accepted baseline.
DanielRosenwasser 99d5b98
Ensure that the default value of `--strict` is described as `true`.
DanielRosenwasser 5742ea7
Accept baselines.
DanielRosenwasser 7ae3376
Merge main
RyanCavanaugh f01d913
Merge on top of strict:true
RyanCavanaugh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
tests/baselines/reference/alwaysStrictDeprecation.errors.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| /foo/tsconfig.json(3,25): error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. | ||
|
|
||
|
|
||
| ==== /foo/tsconfig.json (1 errors) ==== | ||
| { | ||
| "compilerOptions": { | ||
| "alwaysStrict": false | ||
| ~~~~~ | ||
| !!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. | ||
| } | ||
| } | ||
|
|
||
| ==== /foo/a.ts (0 errors) ==== | ||
| const a = 1; | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| //// [tests/cases/compiler/alwaysStrictDeprecation.ts] //// | ||
|
|
||
| //// [a.ts] | ||
| const a = 1; | ||
|
|
||
|
|
||
| //// [a.js] | ||
| var a = 1; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| //// [tests/cases/compiler/alwaysStrictDeprecation.ts] //// | ||
|
|
||
| === /foo/a.ts === | ||
| const a = 1; | ||
| >a : Symbol(a, Decl(a.ts, 0, 5)) | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| //// [tests/cases/compiler/alwaysStrictDeprecation.ts] //// | ||
|
|
||
| === /foo/a.ts === | ||
| const a = 1; | ||
| >a : 1 | ||
| > : ^ | ||
| >1 : 1 | ||
| > : ^ | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| //// [tests/cases/compiler/alwaysStrictDeprecationSilenced.ts] //// | ||
|
|
||
| //// [a.ts] | ||
| const a = 1; | ||
|
|
||
|
|
||
| //// [a.js] | ||
| var a = 1; |
6 changes: 6 additions & 0 deletions
6
tests/baselines/reference/alwaysStrictDeprecationSilenced.symbols
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| //// [tests/cases/compiler/alwaysStrictDeprecationSilenced.ts] //// | ||
|
|
||
| === /foo/a.ts === | ||
| const a = 1; | ||
| >a : Symbol(a, Decl(a.ts, 0, 5)) | ||
|
|
9 changes: 9 additions & 0 deletions
9
tests/baselines/reference/alwaysStrictDeprecationSilenced.types
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| //// [tests/cases/compiler/alwaysStrictDeprecationSilenced.ts] //// | ||
|
|
||
| === /foo/a.ts === | ||
| const a = 1; | ||
| >a : 1 | ||
| > : ^ | ||
| >1 : 1 | ||
| > : ^ | ||
|
|
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // @typeScriptVersion: 6.0 | ||
| // @filename: /foo/tsconfig.json | ||
| { | ||
| "compilerOptions": { | ||
| "alwaysStrict": false | ||
| } | ||
| } | ||
|
|
||
| // @filename: /foo/a.ts | ||
| const a = 1; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // @typeScriptVersion: 6.0 | ||
| // @filename: /foo/tsconfig.json | ||
| { | ||
| "compilerOptions": { | ||
| "alwaysStrict": false, | ||
| "ignoreDeprecations": "6.0" | ||
| } | ||
| } | ||
|
|
||
| // @filename: /foo/a.ts | ||
| const a = 1; |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.