mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
13 lines
290 B
TypeScript
13 lines
290 B
TypeScript
//// [tests/cases/compiler/arrayFlatNoCrashInference.ts] ////
|
|
|
|
//// [arrayFlatNoCrashInference.ts]
|
|
function foo<T>(arr: T[], depth: number) {
|
|
return arr.flat(depth);
|
|
}
|
|
|
|
//// [arrayFlatNoCrashInference.js]
|
|
"use strict";
|
|
function foo(arr, depth) {
|
|
return arr.flat(depth);
|
|
}
|