@@ -9,17 +9,17 @@ const readonlyArray: ReadonlyArray<number> = [];
9
9
10
10
array.flatMap((): ReadonlyArray<number> => []); // ok
11
11
>array.flatMap((): ReadonlyArray<number> => []) : number[]
12
- >array.flatMap : <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[] , thisArg?: This) => U []
12
+ >array.flatMap : <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U, thisArg?: This) => (U extends readonly (infer V)[] ? V : U) []
13
13
>array : number[]
14
- >flatMap : <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[] , thisArg?: This) => U []
14
+ >flatMap : <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U, thisArg?: This) => (U extends readonly (infer V)[] ? V : U) []
15
15
>(): ReadonlyArray<number> => [] : () => readonly number[]
16
16
>[] : undefined[]
17
17
18
18
readonlyArray.flatMap((): ReadonlyArray<number> => []); // ok
19
19
>readonlyArray.flatMap((): ReadonlyArray<number> => []) : number[]
20
- >readonlyArray.flatMap : <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[] , thisArg?: This) => U []
20
+ >readonlyArray.flatMap : <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U, thisArg?: This) => (U extends readonly (infer V)[] ? V : U) []
21
21
>readonlyArray : readonly number[]
22
- >flatMap : <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[] , thisArg?: This) => U []
22
+ >flatMap : <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U, thisArg?: This) => (U extends readonly (infer V)[] ? V : U) []
23
23
>(): ReadonlyArray<number> => [] : () => readonly number[]
24
24
>[] : undefined[]
25
25
0 commit comments