#Errors for Deprecated APIs

7 messages · Page 1 of 1 (latest)

placid kayak
#

Is there a way to have the TS compiler error on deprecated APIs? I would love for teams to be able to configure this as they migrate to new major versions of our APIs.

primal timber
#

you can use the /** @deprecated */ annotation to get warnings in VSCode (and probably other editors). that's not a hard error though

#

if you use ESLint there's this plugin: https://www.npmjs.com/package/eslint-plugin-deprecation

placid kayak
#

That may work. Thanks, @primal timber!

agile gust
primal timber