Array.prototype.flat
typing is incorrect
#38901
Labels
Question
An issue which isn't directly actionable in code
TypeScript Version: 3.9.3, 4.0.0-dev.20200602, Nightly
Search Terms:
Expected behavior:
Given
abc = [[1,2]]
, I expectabc.flat()
to equal[1,2]
.Actual behavior:
I get the following error:
error TS2339: Property 'flat' does not exist on type 'number[][]'.
Related Issues:
Potentially related to #38298
Code
Output
Compiler Options
Playground Link: Provided
The text was updated successfully, but these errors were encountered: