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];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
////interface I {
|
|
|
|
//// name: string;
|
|
|
|
//// age: number;
|
|
|
|
////}
|
|
|
|
|
|
|
|
////var i: I;
|
2015-07-16 06:13:19 +02:00
|
|
|
////var /*4*/c3 = [i, a];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
2020-02-26 01:11:21 +01:00
|
|
|
verify.quickInfos({
|
|
|
|
4: "var c3: I[]"
|
|
|
|
});
|
2016-09-09 18:02:55 +02:00
|
|
|
verify.quickInfos({
|
|
|
|
1: "var c: {\n name: string;\n age: number;\n}[]",
|
|
|
|
2: "var c1: {\n name: string;\n age: number;\n}[]",
|
|
|
|
3:
|
|
|
|
`var c2: ({
|
|
|
|
name: string;
|
|
|
|
age: number;
|
|
|
|
address: string;
|
|
|
|
} | {
|
|
|
|
name: string;
|
|
|
|
age: number;
|
|
|
|
dob: Date;
|
|
|
|
})[]`,
|
|
|
|
4: "var c3: I[]"
|
|
|
|
});
|