--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid-declaration-merging.ts --- # Input ```ts // Type and value merging export type Order = -1 | 0 | 1; interface Order { f(): void; } class Order { prop: number; } enum Order { Lower = -1, Equal = 0, Upper = 1, } ``` # Diagnostics ``` invalid-declaration-merging.ts:4:11 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'Order'. Consider to delete it or rename it. 2 │ export type Order = -1 | 0 | 1; 3 │ > 4 │ interface Order { │ ^^^^^ 5 │ f(): void; 6 │ } i 'Order' is defined here: 1 │ // Type and value merging > 2 │ export type Order = -1 | 0 | 1; │ ^^^^^ 3 │ 4 │ interface Order { ``` ``` invalid-declaration-merging.ts:8:7 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'Order'. Consider to delete it or rename it. 6 │ } 7 │ > 8 │ class Order { │ ^^^^^ 9 │ prop: number; 10 │ } i 'Order' is defined here: 1 │ // Type and value merging > 2 │ export type Order = -1 | 0 | 1; │ ^^^^^ 3 │ 4 │ interface Order { ``` ``` invalid-declaration-merging.ts:12:6 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'Order'. Consider to delete it or rename it. 10 │ } 11 │ > 12 │ enum Order { │ ^^^^^ 13 │ Lower = -1, 14 │ Equal = 0, i 'Order' is defined here: 1 │ // Type and value merging > 2 │ export type Order = -1 | 0 | 1; │ ^^^^^ 3 │ 4 │ interface Order { ```