Skip to content

@deprecated strikethrough doesn't appear in many cases, such as JSX elements, const arrow functions, or properties. #39374

Open

Description

TypeScript Version: 4.0.0-dev.20200701
VS Code Version: 1.47.0-insider commit: b16b467d3e

Search Terms:
deprecated

Code

/** @deprecated */
type Props = {
  /** @deprecated */
  old: string,
  new: string,
}

/** @deprecated */
const Component = (props: Props) => <div />;

<Component old="old" new="new" />

/** @deprecated */
type Options = {
  /** @deprecated */
  old: string;
  new: string;
}

/** @deprecated */
const deprecatedFunction = (options: Options) => {}

deprecatedFunction({
  old: "",
  new: "hi",
});

Expected behavior:
All deprecated usages have strikethrough styles: <Component>, the old prop on Component, deprecatedFunction, old

Actual behavior:
Only props and options have strikethrough styles.
Screenshot - 7_1_2020 , 9_07_19 PM

Playground Link:
Strikethrough isn't visible here, but ... is (just like stable VS Code vs. Insiders).
https://www.typescriptlang.org/play/?jsx=2&ts=4.0.0-beta&ssl=29&ssc=1&pln=1&pc=1#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgIilQ3wG4AocgegCoa4ABAEyTCLRRiSbhqvJgBPMEjgAFHGADOcALxwA3uThxa9Zq3aduvfiogAbJgC44UmFGAA7AOYAaZXCtIA7qfOXbDgL6U1jFjYkDi4ePnI0CCtzOABhXEhnK3h5AAo2CGlTCUypAEo5AD44AB4mYAA3VUKKchL48CikZLhDJll8NvwnVw7nF26qQr86AM1g7TD+IRE4AHkwGGAomXklFX8NIJCdcP0jdwtrGwoVfsPPE-JfalGtrVDdCJX4QIfuADEAVysMZas5HBUpklitTAtQdECrJigobm8JqFvr9Ial1q0DgR8A4zq5TPgABbAbHXPIUIA

Related Issues:
None (feature is new to 4.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFix AvailableA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestone

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions