TypeScript/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.types

102 lines
8.4 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/tooFewArgumentsInGenericFunctionTypedArgument.ts ===
interface Collection<T, U> {
2015-04-13 23:01:57 +02:00
>Collection : Collection<T, U>, Symbol(Collection, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 0))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 21))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 23))
2014-08-15 23:33:16 +02:00
length: number;
2015-04-13 23:01:57 +02:00
>length : number, Symbol(length, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 28))
2014-08-15 23:33:16 +02:00
add(x: T, y: U): void;
2015-04-13 23:01:57 +02:00
>add : (x: T, y: U) => void, Symbol(add, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 1, 19))
>x : T, Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 2, 8))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 21))
>y : U, Symbol(y, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 2, 13))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 23))
2014-08-15 23:33:16 +02:00
remove(x: T, y: U): boolean;
2015-04-13 23:01:57 +02:00
>remove : (x: T, y: U) => boolean, Symbol(remove, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 2, 26))
>x : T, Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 3, 11))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 21))
>y : U, Symbol(y, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 3, 16))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 23))
2014-08-15 23:33:16 +02:00
}
interface Combinators {
2015-04-13 23:01:57 +02:00
>Combinators : Combinators, Symbol(Combinators, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 4, 1))
2014-08-15 23:33:16 +02:00
map<T, U, V>(c: Collection<T,U>, f: (x: T, y: U) => V): Collection<T, V>;
2015-04-13 23:01:57 +02:00
>map : { <T, U, V>(c: Collection<T, U>, f: (x: T, y: U) => V): Collection<T, V>; <T, U>(c: Collection<T, U>, f: (x: T, y: U) => any): Collection<any, any>; }, Symbol(map, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 5, 23), Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 77))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 8))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 10))
>V : V, Symbol(V, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 13))
>c : Collection<T, U>, Symbol(c, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 17))
>Collection : Collection<T, U>, Symbol(Collection, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 0))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 8))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 10))
>f : (x: T, y: U) => V, Symbol(f, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 36))
>x : T, Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 41))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 8))
>y : U, Symbol(y, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 46))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 10))
>V : V, Symbol(V, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 13))
>Collection : Collection<T, U>, Symbol(Collection, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 0))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 8))
>V : V, Symbol(V, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 13))
2014-08-15 23:33:16 +02:00
map<T, U>(c: Collection<T,U>, f: (x: T, y: U) => any): Collection<any, any>;
2015-04-13 23:01:57 +02:00
>map : { <T, U, V>(c: Collection<T, U>, f: (x: T, y: U) => V): Collection<T, V>; <T, U>(c: Collection<T, U>, f: (x: T, y: U) => any): Collection<any, any>; }, Symbol(map, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 5, 23), Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 77))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 8))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 10))
>c : Collection<T, U>, Symbol(c, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 14))
>Collection : Collection<T, U>, Symbol(Collection, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 0))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 8))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 10))
>f : (x: T, y: U) => any, Symbol(f, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 33))
>x : T, Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 38))
>T : T, Symbol(T, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 8))
>y : U, Symbol(y, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 43))
>U : U, Symbol(U, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 7, 10))
>Collection : Collection<T, U>, Symbol(Collection, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 0))
2014-08-15 23:33:16 +02:00
}
var c2: Collection<number, string>;
2015-04-13 23:01:57 +02:00
>c2 : Collection<number, string>, Symbol(c2, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 9, 3))
>Collection : Collection<T, U>, Symbol(Collection, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 0, 0))
2014-08-15 23:33:16 +02:00
var _: Combinators;
2015-04-13 23:01:57 +02:00
>_ : Combinators, Symbol(_, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 10, 3))
>Combinators : Combinators, Symbol(Combinators, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 4, 1))
2014-08-15 23:33:16 +02:00
var r1a = _.map(c2, (x) => { return x.toFixed() });
2015-04-13 23:01:57 +02:00
>r1a : Collection<number, string>, Symbol(r1a, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 11, 3))
2014-08-15 23:33:16 +02:00
>_.map(c2, (x) => { return x.toFixed() }) : Collection<number, string>
2015-04-13 23:01:57 +02:00
>_.map : { <T, U, V>(c: Collection<T, U>, f: (x: T, y: U) => V): Collection<T, V>; <T, U>(c: Collection<T, U>, f: (x: T, y: U) => any): Collection<any, any>; }, Symbol(Combinators.map, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 5, 23), Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 77))
>_ : Combinators, Symbol(_, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 10, 3))
>map : { <T, U, V>(c: Collection<T, U>, f: (x: T, y: U) => V): Collection<T, V>; <T, U>(c: Collection<T, U>, f: (x: T, y: U) => any): Collection<any, any>; }, Symbol(Combinators.map, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 5, 23), Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 77))
>c2 : Collection<number, string>, Symbol(c2, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 9, 3))
2014-08-15 23:33:16 +02:00
>(x) => { return x.toFixed() } : (x: number) => string
2015-04-13 23:01:57 +02:00
>x : number, Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 11, 21))
2014-08-15 23:33:16 +02:00
>x.toFixed() : string
2015-04-13 23:01:57 +02:00
>x.toFixed : (fractionDigits?: number) => string, Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
>x : number, Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 11, 21))
>toFixed : (fractionDigits?: number) => string, Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
2014-08-15 23:33:16 +02:00
var rf1 = (x: number) => { return x.toFixed() };
2015-04-13 23:01:57 +02:00
>rf1 : (x: number) => string, Symbol(rf1, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 12, 3))
2014-08-15 23:33:16 +02:00
>(x: number) => { return x.toFixed() } : (x: number) => string
2015-04-13 23:01:57 +02:00
>x : number, Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 12, 11))
2014-08-15 23:33:16 +02:00
>x.toFixed() : string
2015-04-13 23:01:57 +02:00
>x.toFixed : (fractionDigits?: number) => string, Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
>x : number, Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 12, 11))
>toFixed : (fractionDigits?: number) => string, Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
2014-08-15 23:33:16 +02:00
var r1b = _.map(c2, rf1);
2015-04-13 23:01:57 +02:00
>r1b : Collection<number, string>, Symbol(r1b, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 13, 3))
2014-08-15 23:33:16 +02:00
>_.map(c2, rf1) : Collection<number, string>
2015-04-13 23:01:57 +02:00
>_.map : { <T, U, V>(c: Collection<T, U>, f: (x: T, y: U) => V): Collection<T, V>; <T, U>(c: Collection<T, U>, f: (x: T, y: U) => any): Collection<any, any>; }, Symbol(Combinators.map, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 5, 23), Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 77))
>_ : Combinators, Symbol(_, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 10, 3))
>map : { <T, U, V>(c: Collection<T, U>, f: (x: T, y: U) => V): Collection<T, V>; <T, U>(c: Collection<T, U>, f: (x: T, y: U) => any): Collection<any, any>; }, Symbol(Combinators.map, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 5, 23), Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 77))
>c2 : Collection<number, string>, Symbol(c2, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 9, 3))
>rf1 : (x: number) => string, Symbol(rf1, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 12, 3))
2014-08-15 23:33:16 +02:00