Description
π Search Terms
Deprecated
suppressImplicitAnyIndexErrors
Warn on usage of deprecated feature
β Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
β Suggestion
For features that are being Deprecated, such as suppressImplicitAnyIndexErrors
can we have an option to have warnings shown.
We have an old project which had this option enabled (nobody knows why!), but there's a lot of places that error with this option removed.
I'd like to be able to see where all the non-compliant code is so we can progressively fix the issues before removing the suppressImplicitAnyIndexErrors
.
It would be handy to either have:
emitWarningsForDeprecatedFeatures
setting,- the ability to set the error/warning level in the tsconfig file, e.g.,
"suppressImplicitAnyIndexErrors": "warning",
With either of these options set then I would want to see the warning in VSCode or when compiling.
π Motivating Example
Deprecated features and settings such as suppressImplicitAnyIndexErrors
can have a significant impact on large projects due to the amount of rework required to satisfy the change in functionality.
With this change developers will be able to be warned about non-compliant code without it failing the build.
This allows code to be progressively updated to be compliant over the lifetime of the deprecation without having to embark on a "big-bang" conversion project.
This will allow the easier adoption of newer version of Typescript, with developers not feeling unable to upgrade due to the amount of work involed.
π» Use Cases
- I want to be able to upgrade to later version of typescript with the minimum of effort
- The current system is either on or off, either failing or working.
We cannot just turn the option off as it introduces hundreds of errors, breaking our builds.
We can't easily see where the errors are, this makes it hard to track and mange.
In a previously situation we've used eslint and set a rule to "Warn" and then issues can be tracked, developers see them in VSCode and progressively fix them. - Currently we are not planning on upgrading typescript past 5.5 unless forced to do so.