2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
////var a = { name: 'bob', age: 18 };
|
|
|
|
////var b = { name: 'jim', age: 20 };
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*1*/c = [a, b];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
////var a1 = { name: 'bob', age: 18 };
|
|
|
|
////var b1 = { name: 'jim', age: 20, dob: new Date() };
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*2*/c1 = [a1, b1];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
////var a2 = { name: 'bob', age: 18, address: 'springfield' };
|
|
|
|
////var b2 = { name: 'jim', age: 20, dob: new Date() };
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*3*/c2 = [a2, b2];
|
|
|
|
////var /*4*/c2a = [a2, b2, a1];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
////interface I {
|
|
|
|
//// name: string;
|
|
|
|
//// age: number;
|
|
|
|
////}
|
|
|
|
|
|
|
|
////var i: I;
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*5*/c3 = [a2, b2, i];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('1');
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) c: {\n name: string;\n age: number;\n}[]');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('2');
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) c1: {\n name: string;\n age: number;\n}[]');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('3');
|
2014-10-18 01:53:18 +02:00
|
|
|
verify.quickInfoIs('(var) c2: ({\n\
|
2014-10-13 23:06:16 +02:00
|
|
|
name: string;\n\
|
|
|
|
age: number;\n\
|
|
|
|
address: string;\n\
|
|
|
|
} | {\n\
|
|
|
|
name: string;\n\
|
|
|
|
age: number;\n\
|
|
|
|
dob: Date;\n\
|
2014-10-18 01:53:18 +02:00
|
|
|
})[]');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('4');
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) c2a: {\n name: string;\n age: number;\n}[]');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('5');
|
2014-10-13 23:06:16 +02:00
|
|
|
verify.quickInfoIs('(var) c3: I[]');
|
|
|
|
|