2014-09-12 21:43:34 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
////interface IFoo {
|
|
|
|
//// x: number;
|
|
|
|
//// y: string;
|
|
|
|
////}
|
|
|
|
////
|
2014-09-15 22:00:50 +02:00
|
|
|
////function foo<S, T extends IFoo, U extends Object, V extends IFoo>() {
|
2014-07-13 01:04:16 +02:00
|
|
|
//// var s:S, t: T, u: U, v: V;
|
|
|
|
//// s./*S*/; // no constraint, no completion
|
|
|
|
//// t./*T*/; // IFoo
|
|
|
|
//// u./*U*/; // IFoo
|
|
|
|
//// v./*V*/; // IFoo
|
|
|
|
////}
|
|
|
|
|
|
|
|
goTo.marker("S");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListIsEmpty();
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("T");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("x", "(property) IFoo.x: number");
|
|
|
|
verify.completionListContains("y", "(property) IFoo.y: string");
|
|
|
|
verify.completionListCount(2);
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("U");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("toString", "(method) Object.toString(): string");
|
|
|
|
verify.completionListCount(7); // constructor, toString, toLocaleString, valueOf, hasOwnProperty, isPrototypeOf, propertyIsEnumerable
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("V");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("x", "(property) IFoo.x: number");
|
|
|
|
verify.completionListContains("y", "(property) IFoo.y: string");
|
|
|
|
verify.completionListCount(2);
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|