TypeScript/tests/cases/fourslash/promiseTyping1.ts
Cyrus Najmabadi eed6f0deca Use an output format for quickinfo that more closely matches the original source.
i.e. use  "var v: string" instead of "(var) v: string".

The parens case should only be used when we're using an english description instead of
an actual language construct.
2015-03-24 00:16:49 -07:00

24 lines
1.1 KiB
TypeScript

/// <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<string>;
//// var p/*1*/2 = p1.then(function (x/*2*/x) {
//// return xx;
//// });
//// p2.then(function (x/*3*/x) {
//// } );
goTo.marker("1");
verify.quickInfoIs('var p2: IPromise<string>');
goTo.marker("2");
verify.quickInfoIs('(parameter) xx: string');
goTo.marker("3");
verify.quickInfoIs('(parameter) xx: string');