185 lines
42 KiB
Plaintext
185 lines
42 KiB
Plaintext
=== tests/cases/compiler/mapOnTupleTypes01.ts ===
|
|
|
|
export let mapOnLooseArrayLiteral = [1, 2, 3, 4].map(n => n * n);
|
|
>mapOnLooseArrayLiteral : number[]
|
|
>[1, 2, 3, 4].map(n => n * n) : number[]
|
|
>[1, 2, 3, 4].map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>[1, 2, 3, 4] : number[]
|
|
>1 : 1
|
|
>2 : 2
|
|
>3 : 3
|
|
>4 : 4
|
|
>map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>n => n * n : (this: undefined, n: number) => number
|
|
>n : number
|
|
>n * n : number
|
|
>n : number
|
|
>n : number
|
|
|
|
// Length 1
|
|
|
|
let numTuple: [number] = [1];
|
|
>numTuple : [number]
|
|
>[1] : [number]
|
|
>1 : 1
|
|
|
|
export let a = numTuple.map(x => x * x);
|
|
>a : number[]
|
|
>numTuple.map(x => x * x) : number[]
|
|
>numTuple.map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>numTuple : [number]
|
|
>map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>x => x * x : (this: undefined, x: number) => number
|
|
>x : number
|
|
>x * x : number
|
|
>x : number
|
|
>x : number
|
|
|
|
// Length 2
|
|
|
|
let numNum: [number, number] = [ 100, 100];
|
|
>numNum : [number, number]
|
|
>[ 100, 100] : [number, number]
|
|
>100 : 100
|
|
>100 : 100
|
|
|
|
let strStr: [string, string] = ["hello", "hello"];
|
|
>strStr : [string, string]
|
|
>["hello", "hello"] : [string, string]
|
|
>"hello" : "hello"
|
|
>"hello" : "hello"
|
|
|
|
let numStr: [number, string] = [ 100, "hello"];
|
|
>numStr : [number, string]
|
|
>[ 100, "hello"] : [number, string]
|
|
>100 : 100
|
|
>"hello" : "hello"
|
|
|
|
export let b = numNum.map(n => n * n);
|
|
>b : [number, number]
|
|
>numNum.map(n => n * n) : [number, number]
|
|
>numNum.map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>numNum : [number, number]
|
|
>map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>n => n * n : (this: undefined, n: number) => number
|
|
>n : number
|
|
>n * n : number
|
|
>n : number
|
|
>n : number
|
|
|
|
export let c = strStr.map(s => s.charCodeAt(0));
|
|
>c : [number, number]
|
|
>strStr.map(s => s.charCodeAt(0)) : [number, number]
|
|
>strStr.map : { <U>(this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; <U>(this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; <U>(this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; <U>(this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; <U>(this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; <U>(this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; <U>(callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; }
|
|
>strStr : [string, string]
|
|
>map : { <U>(this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; <U>(this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; <U>(this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; <U>(this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; <U>(this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; <U>(this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; <U>(callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; }
|
|
>s => s.charCodeAt(0) : (this: undefined, s: string) => number
|
|
>s : string
|
|
>s.charCodeAt(0) : number
|
|
>s.charCodeAt : (index: number) => number
|
|
>s : string
|
|
>charCodeAt : (index: number) => number
|
|
>0 : 0
|
|
|
|
export let d = numStr.map(x => x);
|
|
>d : [string | number, string | number]
|
|
>numStr.map(x => x) : [string | number, string | number]
|
|
>numStr.map : { <U>(this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U, U]; <U>(this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U]; <U>(this: [string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U]; <U>(this: [string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U]; <U>(this: [string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U]; <U>(this: [string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): U[]; <U>(callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): U[]; }
|
|
>numStr : [number, string]
|
|
>map : { <U>(this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U, U]; <U>(this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U]; <U>(this: [string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U]; <U>(this: [string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U]; <U>(this: [string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U]; <U>(this: [string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): U[]; <U>(callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): U[]; }
|
|
>x => x : (this: undefined, x: string | number) => string | number
|
|
>x : string | number
|
|
>x : string | number
|
|
|
|
// Length 3
|
|
|
|
let numNumNum: [number, number, number] = [1, 2, 3];
|
|
>numNumNum : [number, number, number]
|
|
>[1, 2, 3] : [number, number, number]
|
|
>1 : 1
|
|
>2 : 2
|
|
>3 : 3
|
|
|
|
export let e = numNumNum.map(n => n * n);
|
|
>e : [number, number, number]
|
|
>numNumNum.map(n => n * n) : [number, number, number]
|
|
>numNumNum.map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>numNumNum : [number, number, number]
|
|
>map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>n => n * n : (this: undefined, n: number) => number
|
|
>n : number
|
|
>n * n : number
|
|
>n : number
|
|
>n : number
|
|
|
|
// Length 4
|
|
|
|
let numNumNumNum: [number, number, number, number] = [1, 2, 3, 4];
|
|
>numNumNumNum : [number, number, number, number]
|
|
>[1, 2, 3, 4] : [number, number, number, number]
|
|
>1 : 1
|
|
>2 : 2
|
|
>3 : 3
|
|
>4 : 4
|
|
|
|
export let f = numNumNumNum.map(n => n * n);
|
|
>f : [number, number, number, number]
|
|
>numNumNumNum.map(n => n * n) : [number, number, number, number]
|
|
>numNumNumNum.map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>numNumNumNum : [number, number, number, number]
|
|
>map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>n => n * n : (this: undefined, n: number) => number
|
|
>n : number
|
|
>n * n : number
|
|
>n : number
|
|
>n : number
|
|
|
|
// Length 5
|
|
|
|
let numNumNumNumNum: [number, number, number, number, number] = [1, 2, 3, 4, 5];
|
|
>numNumNumNumNum : [number, number, number, number, number]
|
|
>[1, 2, 3, 4, 5] : [number, number, number, number, number]
|
|
>1 : 1
|
|
>2 : 2
|
|
>3 : 3
|
|
>4 : 4
|
|
>5 : 5
|
|
|
|
export let g = numNumNumNumNum.map(n => n * n);
|
|
>g : [number, number, number, number, number]
|
|
>numNumNumNumNum.map(n => n * n) : [number, number, number, number, number]
|
|
>numNumNumNumNum.map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>numNumNumNumNum : [number, number, number, number, number]
|
|
>map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>n => n * n : (this: undefined, n: number) => number
|
|
>n : number
|
|
>n * n : number
|
|
>n : number
|
|
>n : number
|
|
|
|
|
|
// Length 6
|
|
|
|
let numNumNumNumNumNum: [number, number, number, number, number, number] = [1, 2, 3, 4, 5, 6];
|
|
>numNumNumNumNumNum : [number, number, number, number, number, number]
|
|
>[1, 2, 3, 4, 5, 6] : [number, number, number, number, number, number]
|
|
>1 : 1
|
|
>2 : 2
|
|
>3 : 3
|
|
>4 : 4
|
|
>5 : 5
|
|
>6 : 6
|
|
|
|
export let h = numNumNumNumNum.map(n => n * n);
|
|
>h : [number, number, number, number, number]
|
|
>numNumNumNumNum.map(n => n * n) : [number, number, number, number, number]
|
|
>numNumNumNumNum.map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>numNumNumNumNum : [number, number, number, number, number]
|
|
>map : { <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; <U>(this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; <Z, U>(this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; <U>(this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; <Z, U>(this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; <U>(this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; <Z, U>(this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; <U>(this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; <Z, U>(this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; <U>(callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; <Z, U>(callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; }
|
|
>n => n * n : (this: undefined, n: number) => number
|
|
>n : number
|
|
>n * n : number
|
|
>n : number
|
|
>n : number
|
|
|