Skip to content

TS 3 only - 'You cannot rename this element' - while renaming discriminated unions #26210

Closed
@smith-chris

Description

@smith-chris

Appears on:

  • VSCode + typescript@3.0.1, typescript@3.1.0-dev.20180804 (i have VSCode configured to use global TS)
  • insiders VSCode install without extensions (1.26.0-insider)

Doesn't appear on:

  • VSCode + typescript@2.9.2 (and probs all below)

Exact commit to replicate it on (src/store/game.ts):
https://github.com/smith-chris/poke/tree/b77d0f78d2e3700bf45e5c7ab3a9a4055ae26cf5

I think video explains it best:
https://vimeo.com/283216196

I'm filing it in typescript repo as the bug seems to be independent of VSCode version but dependent on TS version. I looked at last 30 days issues and didn't find related one.

I hope that's enough information. Big thanks for all the work on TypeScript! 👏 I'm loving it

Cheers,
Chris

TypeScript Version: 3.1.0-dev.201xxxxx

Search Terms:

Code

// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.

Expected behavior:

Actual behavior:

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions