Skip to content

5.5 deprecations are no-ops, not errors #58313

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

Merged

Conversation

RyanCavanaugh
Copy link
Member

In #51000 we said

Release / Phase Description
TypeScript 5.0 - Phase 1 ❔ Deprecation warnings introduced
TypeScript 5.5 - Phase 2 ⚠ Flags start doing nothing
TypeScript 6.0 - Phase 3 ❌ Flags removed entirely

So the correct behavior under e.g.

  "ignoreDeprecations": "5.0",
  "keyofStringsOnly": true

is to not error, but instead to pretend we didn't see keyofStringsOnly

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 25, 2024
@@ -4593,10 +4594,10 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
}
else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would probably be even better to add new diags in the middle here that says "is deprecated and has stopped functioning", since it'll be in future tense even when we're on like TS 5.6.

@jakebailey
Copy link
Member

Sorry about this; I think I made this stricter than you intended when I refactored things a bit back in 5.0.

@@ -1,8 +1,8 @@
error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration.
error TS5101: Option 'noImplicitUseStrict' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like Jake said,

Suggested change
error TS5101: Option 'noImplicitUseStrict' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
error TS5101: Option 'noImplicitUseStrict' is deprecated and has stopped functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.

would be better. I'll approve, but we should probably update this.

@DanielRosenwasser
Copy link
Member

Going to merge for the beta

@DanielRosenwasser DanielRosenwasser merged commit ecf3789 into microsoft:release-5.5 Apr 25, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants