Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

🐛 lint/correctness/noUndeclaredVariables error in mapped types #4178

@Farnsi

Description

@Farnsi

Environment information

Rome 11.0.0
Typescript 4.9.4

What happened?

Lint error on mapped types

The K variable is undeclared rome(lint/correctness/noUndeclaredVariables)

interface SomeType {
  x: string
}

type OtherType = {
  [K in keyof SomeType]: SomeType[K]
}

Expected result

It should not throw an error.

Code of Conduct

  • I agree to follow Rome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-LinterArea: linterS-Bug: confirmedStatus: report has been confirmed as a valid bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions