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
|
|
|
|
////}
|
|
|
|
|
2018-05-01 22:00:13 +02:00
|
|
|
verify.completions(
|
2018-05-03 22:04:08 +02:00
|
|
|
{ marker: "S", exact: undefined },
|
|
|
|
{ marker: ["T", "V"], exact: [{ name: "x", text: "(property) IFoo.x: number" }, { name: "y", text: "(property) IFoo.y: string" }]},
|
|
|
|
{ marker: "U", exact: ["constructor", "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable"] },
|
2018-05-01 22:00:13 +02:00
|
|
|
);
|