2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
////class C {
|
|
|
|
//// name: string;
|
|
|
|
//// age: number;
|
|
|
|
////}
|
|
|
|
|
|
|
|
////interface I {
|
|
|
|
//// [x: number]: C;
|
|
|
|
////}
|
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*1*/x = [null, null];
|
2014-07-13 01:04:16 +02:00
|
|
|
////var x2: I = [null, null];
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*2*/r = x2[0];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
////var a = { name: 'bob', age: 20 };
|
|
|
|
////var b = { name: 'jim', age: 20, dob: new Date() };
|
|
|
|
////var c: C;
|
|
|
|
////var d = { name: 'jim', age: 20, address: 'springfield' };
|
|
|
|
|
|
|
|
////var x3: I = [a, b];
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*3*/r3 = x3[1];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
////var x4: I = [a, b, c];
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*4*/r4 = x4[1];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*5*/x5 = [a, b, c, d];
|
|
|
|
////var /*6*/r5 = x5[1];
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
// the above code should have a couple errors that will need to be updated with appropriate new (non-error) code and quick info checks
|
|
|
|
verify.not.errorExistsBetweenMarkers('1', '6');
|
|
|
|
|
|
|
|
goTo.marker('1');
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) x: any[]');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('2');
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) r: C');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('3');
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) r3: C');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('4');
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) r4: C');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('5');
|
2014-10-13 23:06:16 +02:00
|
|
|
verify.quickInfoIs('(var) x5: C[]');
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker('6');
|
2014-10-13 23:06:16 +02:00
|
|
|
verify.quickInfoIs('(var) r5: C');
|