Skip to content

💅 lint/suspicious/noRedeclare wrongly reported on double type inferrence #7809

@cyrilchapon

Description

@cyrilchapon

Environment information

  • "@biomejs/biome": "2.2.6"
export type BaseColumnKey<T extends readonly string[]> = T[number] extends
  | `-${infer Base}`
  | infer Base
  ? Base
  : never

Rule name

lint/suspicious/noRedeclare

Playground link

https://biomejs.dev/playground/?code=ZQB4AHAAbwByAHQAIAB0AHkAcABlACAAQgBhAHMAZQBDAG8AbAB1AG0AbgBLAGUAeQA8AFQAIABlAHgAdABlAG4AZABzACAAcgBlAGEAZABvAG4AbAB5ACAAcwB0AHIAaQBuAGcAWwBdAD4AIAA9ACAAVABbAG4AdQBtAGIAZQByAF0AIABlAHgAdABlAG4AZABzAAoAIAAgAHwAIABgAC0AJAB7AGkAbgBmAGUAcgAgAEIAYQBzAGUAfQBgAAoAIAAgAHwAIABpAG4AZgBlAHIAIABCAGEAcwBlAAoAIAAgAD8AIABCAGEAcwBlAAoAIAAgADoAIABuAGUAdgBlAHIA

Expected result

This should not report this as a redeclare. (or should it ?)

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-LinterArea: linterL-JavaScriptLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions