2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path="fourslash.ts"/>
|
|
|
|
|
|
|
|
////class Test {
|
2014-10-07 20:30:27 +02:00
|
|
|
//// private _priv(.../*1*/restArgs) {
|
2014-07-13 01:04:16 +02:00
|
|
|
//// }
|
2014-10-07 20:30:27 +02:00
|
|
|
//// public pub(.../*2*/restArgs) {
|
2014-07-13 01:04:16 +02:00
|
|
|
//// var x = restArgs[2];
|
|
|
|
//// }
|
|
|
|
////}
|
2014-10-07 20:30:27 +02:00
|
|
|
////var x: (...y: string[]) => void = function (.../*3*/y) {
|
2014-07-13 01:04:16 +02:00
|
|
|
//// var t = y;
|
|
|
|
////};
|
|
|
|
////function foo(x: (...y: string[]) => void ) { }
|
2014-10-07 20:30:27 +02:00
|
|
|
////foo((.../*4*/y1) => {
|
2014-07-13 01:04:16 +02:00
|
|
|
//// var t = y;
|
|
|
|
////});
|
2014-10-07 20:30:27 +02:00
|
|
|
////foo((/*5*/y2) => {
|
2014-07-13 01:04:16 +02:00
|
|
|
//// var t = y;
|
|
|
|
////});
|
2014-10-07 20:30:27 +02:00
|
|
|
////var t1 :(a1: string, a2: string) => void = (.../*t1*/f1) => { } // f1 => any[];
|
|
|
|
////var t2: (a1: string, ...a2: string[]) => void = (.../*t2*/f1) => { } // f1 => any[];
|
2014-10-07 23:04:30 +02:00
|
|
|
////var t3: (a1: number, a2: boolean, ...c: string[]) => void = (/*t31*/f1, .../*t32*/f2) => { }; // f1 => number, f2 => any[]
|
2014-10-07 20:30:27 +02:00
|
|
|
////var t4: (...a1: string[]) => void = (.../*t4*/f1) => { }; // f1 => string[]
|
|
|
|
////var t5: (...a1: string[]) => void = (/*t5*/f1) => { }; // f1 => string
|
|
|
|
////var t6: (...a1: string[]) => void = (/*t61*/f1, .../*t62*/f2) => { }; // f1 => string, f2 => string[]
|
|
|
|
////var t7: (...a1: string[]) => void = (/*t71*/f1, /*t72*/f2, /*t73*/f3) => { }; // fa => string, f2 => string, f3 => string
|
2014-07-13 01:04:16 +02:00
|
|
|
////// Explicit type annotation
|
2014-10-07 20:30:27 +02:00
|
|
|
////var t8: (...a1: string[]) => void = (/*t8*/f1: number[]) => { };
|
2014-07-13 01:04:16 +02:00
|
|
|
////// Explicit initialization value
|
2014-10-07 20:30:27 +02:00
|
|
|
////var t9: (a1: string[], a2: string[]) => void = (/*t91*/f1 = 4, /*t92*/f2 = [false, true]) => { };
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("1");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) restArgs: any[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
goTo.marker("2");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) restArgs: any[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("3");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) y: string[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("4");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) y1: string[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
goTo.marker("5");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) y2: string", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t1");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: any[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t2");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: any[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t31");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: number", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
goTo.marker("t32");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f2: any[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t4");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: string[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t5");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: string", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t61");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: string", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
goTo.marker("t62");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f2: string[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t71");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: string", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
goTo.marker("t72");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f2: string", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
goTo.marker("t73");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f3: string", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t8");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: number[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("t91");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f1: string[]", "");
|
2014-07-13 01:04:16 +02:00
|
|
|
goTo.marker("t92");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(parameter) f2: string[]", "");
|