Skip to content

"Excessive stack depth comparing types 'FlatArray<Arr, ?>' and 'FlatArray<Arr, ?>'" false positive #43493

Closed
@DetachHead

Description

@DetachHead

Bug Report

seems to be a very similar issue to #43249, where #43435 didn't seem to fix it

🔎 Search Terms

Excessive stack depth comparing types 'FlatArray<Arr, ?>' and 'FlatArray<Arr, ?>

🕗 Version & Regression Information

4.2.3-dev.20210401

⏯ Playground Link

Playground link with relevant code

💻 Code

declare const foo: unknown[]
const bar = foo.flatMap(bar => bar as Foo) //Excessive stack depth comparing types 'FlatArray<Arr, ?>' and 'FlatArray<Arr, ?>'.(2321)

interface Foo extends Array<string> {}

🙁 Actual behavior

Excessive stack depth comparing types 'FlatArray<Arr, ?>' and 'FlatArray<Arr, ?> error

🙂 Expected behavior

no error

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions