Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Add a warning when using a JSDoc deprecated method #825

@louy

Description

@louy

So this was previously suggested in microsoft/TypeScript#390, but it seems like it should be in tslint, not typescript.

The idea is when a function which has the tag "@deprecated" is used it should show a warning.
For example:

interface IX {
  /**
   * @deprecated
   */
  function doSomething(): void;
}

class X implements IX {
  function doSomething(): void;

  /**
   * @deprecated
   */
  function doSomethingElse(): void;
}

const x = new X();
x.doSomething(); // Warning: IX.doSomething is deprecated
x.doSomethingElse(); // Warning: X.doSomethingElse is deprecated

Same thing should preferably apply to attributes. Getters & setters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions