Skip to content

TSGO not reporting TS2548 #2455

@Titozzz

Description

@Titozzz

Steps to reproduce

https://www.typescriptlang.org/play/?#code/MYewdgzgLgBANiOMC8MDaA6LAKMBXOJAQwhjzAGswQB3MGEsy6utAXRgB8Z9CBKNgG4AUEA

Behavior with typescript@5.9

test.ts:13:7 - error TS6133: 'lol' is declared but its value is never read.

13 const lol = [...(null as unknown as unknown[] | null)];
         ~~~

test.ts:13:17 - error TS2548: Type 'unknown[] | null' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.

13 const lol = [...(null as unknown as unknown[] | null)];
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors

Behavior with tsgo

test.ts:13:7 - error TS6133: 'lol' is declared but its value is never read.

13 const lol = [...(null as unknown as unknown[] | null)];
         ~~~


Found 1 error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions