2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/genericFunctionsWithOptionalParameters1.ts ===
|
|
|
|
interface Utils {
|
2015-04-13 23:01:57 +02:00
|
|
|
>Utils : Utils, Symbol(Utils, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
fold<T, S>(c?: Array<T>, folder?: (s: S, t: T) => T, init?: S): T;
|
2015-04-13 23:01:57 +02:00
|
|
|
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
|
|
|
>T : T, Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8))
|
|
|
|
>S : S, Symbol(S, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 10))
|
|
|
|
>c : T[], Symbol(c, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 14))
|
|
|
|
>Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11))
|
|
|
|
>T : T, Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8))
|
|
|
|
>folder : (s: S, t: T) => T, Symbol(folder, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 27))
|
|
|
|
>s : S, Symbol(s, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 38))
|
|
|
|
>S : S, Symbol(S, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 10))
|
|
|
|
>t : T, Symbol(t, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 43))
|
|
|
|
>T : T, Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8))
|
|
|
|
>T : T, Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8))
|
|
|
|
>init : S, Symbol(init, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 55))
|
|
|
|
>S : S, Symbol(S, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 10))
|
|
|
|
>T : T, Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var utils: Utils;
|
2015-04-13 23:01:57 +02:00
|
|
|
>utils : Utils, Symbol(utils, Decl(genericFunctionsWithOptionalParameters1.ts, 4, 3))
|
|
|
|
>Utils : Utils, Symbol(Utils, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
utils.fold(); // no error
|
|
|
|
>utils.fold() : {}
|
2015-04-13 23:01:57 +02:00
|
|
|
>utils.fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(Utils.fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
|
|
|
>utils : Utils, Symbol(utils, Decl(genericFunctionsWithOptionalParameters1.ts, 4, 3))
|
|
|
|
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(Utils.fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
utils.fold(null); // no error
|
|
|
|
>utils.fold(null) : {}
|
2015-04-13 23:01:57 +02:00
|
|
|
>utils.fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(Utils.fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
|
|
|
>utils : Utils, Symbol(utils, Decl(genericFunctionsWithOptionalParameters1.ts, 4, 3))
|
|
|
|
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(Utils.fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
utils.fold(null, null); // no error
|
|
|
|
>utils.fold(null, null) : {}
|
2015-04-13 23:01:57 +02:00
|
|
|
>utils.fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(Utils.fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
|
|
|
>utils : Utils, Symbol(utils, Decl(genericFunctionsWithOptionalParameters1.ts, 4, 3))
|
|
|
|
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(Utils.fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
|
|
|
>null : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
utils.fold(null, null, null); // no error
|
|
|
|
>utils.fold(null, null, null) : {}
|
2015-04-13 23:01:57 +02:00
|
|
|
>utils.fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(Utils.fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
|
|
|
>utils : Utils, Symbol(utils, Decl(genericFunctionsWithOptionalParameters1.ts, 4, 3))
|
|
|
|
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T, Symbol(Utils.fold, Decl(genericFunctionsWithOptionalParameters1.ts, 0, 17))
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
|
|
|
>null : null
|
|
|
|
>null : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|