2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
//// interface IPromise<T> {
|
|
|
|
//// then<U>(success?: (value: T) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void ): IPromise<U>;
|
|
|
|
//// then<U>(success?: (value: T) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void ): IPromise<U>;
|
|
|
|
//// then<U>(success?: (value: T) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void ): IPromise<U>;
|
|
|
|
//// then<U>(success?: (value: T) => U, error?: (error: any) => U, progress?: (progress: any) => void ): IPromise<U>;
|
|
|
|
//// done? <U>(success?: (value: T) => any, error?: (error: any) => any, progress?: (progress: any) => void ): void;
|
|
|
|
//// }
|
|
|
|
//// var p1: IPromise<number> = null;
|
|
|
|
//// p/*1*/1.then(function (x/*2*/x) { });
|
|
|
|
//// var p/*3*/2 = p1.then(function (x/*4*/x) { return "hello"; })
|
|
|
|
//// var p/*5*/3 = p2.then(function (x/*6*/x) {
|
|
|
|
//// return x/*7*/x;
|
|
|
|
//// });
|
|
|
|
|
|
|
|
|
|
|
|
goTo.marker("1");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) p1: IPromise<number>');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("2");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(parameter) xx: number');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("3");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) p2: IPromise<string>');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("4");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(parameter) xx: number');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("5");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) p3: IPromise<string>');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("6");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(parameter) xx: string');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("7");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(parameter) xx: string');
|