Skip to content

can't find name const in latest typescript #48462

Description

@tjx666

typescript: 4.7.0-dev.20220327
vscode: 1.66.0-insider

image

reproduce:

  1. install extension JavaScript and TypeScript Nightly
  2. toggle to latest typescript
  3. copy following code
  4. restart vscode
classTex{type='Text'asconst;}classSvg{type='Svg'asconst;}constmap={text: Tex,svg: Svg}typeM=typeofmap;exportfunctionbar<TextendskeyofM>(type: T): M[T]{consts=map[type];returns;}constcons=bar('text');consta=newcons();constt=s.type;

Metadata

Metadata

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions