Skip to content

semantic: imported type is used but a warning message appears #5435

@btea

Description

@btea

When you import a type and then use this type as the key of an interface, a warning message will appear saying that this type is not used and it is recommended to remove it.

The sample code is as follows:

import type a from 'b'

export interface A {
  [a]: 'test' | '10'
}

I created a repro link with the above code, and you can see the warning message when you open it.

Metadata

Metadata

Assignees

Labels

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions