Skip to content

"{0} only refers to a type but is used as a value" doesn't work for primitive types #15565

Closed
@sandersn

Description

@sandersn
interface Foo { a }
let x = Foo // "'Foo' only refers to a type but it used as a value"
let y = any // 'any' is not found

Expected: error messages are the same.
Actual: let y = any has the generic 'any'-not-found message.

I'm not sure how often people say new string[], but our tests definitely say it a lot!

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions