2014-10-11 02:07:13 +02:00
///<reference path="fourslash.ts" />
////interface One {
2015-08-29 00:59:37 +02:00
//// commonProperty: string;
2014-10-11 02:07:13 +02:00
//// commonFunction(): number;
2020-03-13 22:30:53 +01:00
//// anotherProperty: Record<string, number>;
2014-10-11 02:07:13 +02:00
////}
////
////interface Two {
2015-08-29 00:59:37 +02:00
//// commonProperty: number;
2014-10-11 02:07:13 +02:00
//// commonFunction(): number;
2020-03-13 22:30:53 +01:00
//// anotherProperty: { foo: number }
2014-10-11 02:07:13 +02:00
////}
////
////var x : One | Two;
////
2020-03-13 22:30:53 +01:00
////x.commonProperty./*1*/;
////x.anotherProperty./*2*/;
2014-10-11 02:07:13 +02:00
2018-10-29 18:03:25 +01:00
verify . completions ( {
2020-03-13 22:30:53 +01:00
marker : "1" ,
2018-10-29 18:03:25 +01:00
exact : [
2020-03-13 22:30:53 +01:00
{ name : "toString" , text : "(method) toString(): string (+1 overload)" , documentation : "Returns a string representation of a string." } ,
2018-10-29 18:03:25 +01:00
{ name : "valueOf" , text : "(method) valueOf(): string | number" , documentation : "Returns the primitive value of the specified object." } ,
2020-03-13 22:30:53 +01:00
{ name : "toLocaleString" , text : "(method) toLocaleString(): string (+1 overload)" , documentation : "Returns a date converted to a string using the current locale." } ,
2018-10-29 18:03:25 +01:00
] ,
} ) ;
2020-03-13 22:30:53 +01:00
verify . completions ( {
marker : '2' ,
includes : { name : 'foo' }
} )