Typescript @Deprecated Interface ESLint

Viewed 706

I'm joining a new project and trying to properly migrate/deprecate towards camelCase, but the code base is complex so I don't want to insta-kill everything

interface foo {
  /**
   * @deprecated use 'propA' instead
  */
  prop_A: number,
  /**
   * @deprecated use 'propB' instead
  */
  prop_B: string
}

interface foo {
  propA: number,
  propB: string
}

My code, for the time being, has to set both props, but that's okay -- over time the legacy snake_case code can be remitted and we can start removing the duplicate setters

using the deprecation method is nice because ESLint strikes the legacy props (foo.prop_A) and shows a hover tip to use foo.propA

My Question is
Is there something like:

  /**
   * @deprecated use 'propB' instead
   * @quickfix 'propB'
  */

that will tell ESLint that there should be a quickfix and that on click I'd like to replace prop_b with propB?

0 Answers
Related