forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrayConcat3.types
More file actions
19 lines (16 loc) · 801 Bytes
/
arrayConcat3.types
File metadata and controls
19 lines (16 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
=== tests/cases/compiler/arrayConcat3.ts ===
// TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed
type Fn<T extends object> = <U extends T>(subj: U) => U
>Fn : Fn<T>
>subj : U
function doStuff<T extends object, T1 extends T>(a: Array<Fn<T>>, b: Array<Fn<T1>>) {
>doStuff : <T extends object, T1 extends T>(a: Fn<T>[], b: Fn<T1>[]) => void
>a : Fn<T>[]
>b : Fn<T1>[]
b.concat(a);
>b.concat(a) : Fn<T1>[]
>b.concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; <U extends (Fn<T1> | ConcatArray<Fn<T1>>)[]>(...items: U): (Fn<T1> | Flatten<U[number]>)[]; }
>b : Fn<T1>[]
>concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; <U extends (Fn<T1> | ConcatArray<Fn<T1>>)[]>(...items: U): (Fn<T1> | Flatten<U[number]>)[]; }
>a : Fn<T>[]
}