2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
////module ObjectLiterals {
|
|
|
|
//// interface MyPoint {
|
|
|
|
//// x1: number;
|
|
|
|
//// y1: number;
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// var p1: MyPoint = {
|
|
|
|
//// /*1*/
|
|
|
|
//// };
|
|
|
|
////
|
|
|
|
//// var p2: MyPoint = {
|
|
|
|
//// x1: 5,
|
|
|
|
//// /*2*/
|
|
|
|
//// };
|
|
|
|
////
|
|
|
|
//// var p3: MyPoint = {
|
|
|
|
//// x1/*3*/:
|
|
|
|
//// };
|
|
|
|
////
|
|
|
|
//// var p4: MyPoint = {
|
|
|
|
//// /*4*/y1
|
|
|
|
//// };
|
|
|
|
////}
|
|
|
|
|
|
|
|
// Literal member completion inside empty literal.
|
|
|
|
goTo.marker("1");
|
2014-09-29 18:45:39 +02:00
|
|
|
verify.memberListContains("x1", "(property) MyPoint.x1: number");
|
|
|
|
verify.memberListContains("y1", "(property) MyPoint.y1: number");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
// Literal member completion for 2nd member name.
|
|
|
|
goTo.marker("2");
|
2014-09-29 18:45:39 +02:00
|
|
|
verify.memberListContains("y1", "(property) MyPoint.y1: number");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
// Literal member completion at existing member name location.
|
|
|
|
goTo.marker("3");
|
2014-09-29 18:45:39 +02:00
|
|
|
verify.memberListContains("y1", "(property) MyPoint.y1: number");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("4");
|
2014-09-29 18:45:39 +02:00
|
|
|
verify.memberListContains("x1", "(property) MyPoint.x1: number");
|