Skip to content

Commit 2b4dce0

Browse files
authored
Fix Array#flat() definition (#1275)
1 parent 8095607 commit 2b4dce0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

std/assembly/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ declare class Array<T> {
14301430
join(separator?: string): string;
14311431
reverse(): T[];
14321432
/** Flattens an array of arrays. If any null entries exist in the array, they are ignored, unlike JavaScript's version of Array#flat(). */
1433-
flat(): valueof<T>[];
1433+
flat(): T extends unknown[] ? T : never;
14341434
toString(): string;
14351435
}
14361436

0 commit comments

Comments
 (0)