question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feedback: 5.0 deprecations

See original GitHub issue

See also #51000 / #51424

In 5.0, we’ve marked the following configurations as deprecated:

  • target: ES3
  • noImplicitUseStrict
  • keyofStringsOnly
  • suppressExcessPropertyErrors
  • suppressImplicitAnyIndexErrors
  • noStrictGenericChecks
  • charset
  • out

These configurations will continue to “work” until TypeScript 5.5, at which point they will be removed entirely. In TypeScript 5.0, 5.1, 5.2, 5.3, and 5.4, you can specify ignoreDeprecations: "5.0" to silence this warning.

What should I use instead?

target: ES3

ES3 runtimes are nearly 100% extinct, so we’re removing support for this as an emit target. Use target: ES5 as the next-closest thing along with a linter to detect any potentially-problematic ES3 constructs, or use target: ESNext and use a different downleveling emitter.

noImplicitUseStrict

This flag disables emitting a "use strict"; prologue at the top of module bodies when the target is not implicitly a module. This can lead to unexpected behavior since there are subtle behavioral differences between strict and nonstrict mode. Fix: Remove any reliance on nonstrict behavior.

keyofStringsOnly

This flag removes symbol-based keys from the keyof T type operator. This can lead to unexpected type errors when code relying on this flag interacts with code that doesn’t. Fix: Use string & keyof T to filter keys to those with string types.

suppressExcessPropertyErrors

This flag disables excess property checking. This can lead to unexpected program behavior when an optional property name is misspelled, since no error is issued. Fix: use a type assertion to silence this in cases where you really do want an optional property, or fix the target type.

suppressImplicitAnyIndexErrors

This flag disables the error produced when indexing an object which doesn’t support indexing. This was always intended to be a temporary flag, so is going away. Fix: Add an index signature to the relevant type (or use a type assertion at the indexing location).

noStrictGenericChecks

This flag disables certain checks relating the constraints of generic types, which can lead to undesirable unsound behavior. Fix: Correct the types, or use a type assertion.

charset

This flag hasn’t done anything for a very long time. Fix: Remove it from your config file

out

This flag for emitting a single file from a set of nonmodule inputs incorrectly relied on the current working directory to compute the output filename, leading to unexpected problems when tsc was invoked programmatically or from a different directory. Fix: use outFile instead.

Feedback?

We believe we’ve picked a fairly conservative set of options to deprecate in this release. If these deprecations are overly burdensome for your codebase, we’d like to understand why - please let us know!

Search terms: Flag is deprecated and will stop functioning in TypeScript 5.5. Specify ignoreDeprecations: 5.0 to silence this error

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:6
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fatcerberuscommented, Dec 15, 2022

To clarify, this doesn’t change any behavior when the input file is not a module.

thanks, this was the part I was missing.

0reactions
RyanCavanaughcommented, Dec 16, 2022

Will any-indexing still be allowed when “noImplicitAny”: false is set?

Yes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ruby on Rails 5.0 Release Notes
8.2 Deprecations · Deprecated returning false as a way to halt Active Model and ActiveModel::Validations callback chains. · Deprecated ActiveModel::Errors#get , ...
Read more >
Review Board 5.0 Release Notes | Documentation
The callback usage is still available, but has been deprecated and will be removed in a future release. Bug Fixes¶. Review Requests¶. Fixed...
Read more >
Deprecations by version - GitLab Documentation
Deprecations by version. In each release, GitLab announces features that are deprecated and no longer recommended for use. Each deprecated feature will be ......
Read more >
Deprecated features in the Windows client - Microsoft Learn
Review the list of features that Microsoft is no longer developing in Windows 10 and Windows 11.
Read more >
Mendix Feedback
5 Legacy Feedback Widget Docs ... All Mendix Feedback widgets with versions lower than 8.4.0 are disabled as of October 1st, 2022. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found