2016-11-11 10:25:50 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2018-07-21 01:51:35 +02:00
|
|
|
// @Filename: /a.ts
|
|
|
|
////export const foo = 0;
|
|
|
|
|
|
|
|
// @Filename: /b.ts
|
|
|
|
////const fooo = 0;
|
2016-11-11 10:25:50 +01:00
|
|
|
////class C {
|
|
|
|
//// foo: number;
|
2017-03-15 19:44:36 +01:00
|
|
|
//// constructor() {[|
|
|
|
|
//// foo = 10;
|
|
|
|
//// |]}
|
2016-11-11 10:25:50 +01:00
|
|
|
////}
|
|
|
|
|
2018-07-21 01:51:35 +02:00
|
|
|
goTo.file("/b.ts");
|
|
|
|
verify.codeFixAvailable([
|
|
|
|
{ description: `Import 'foo' from module "./a"` },
|
|
|
|
{ description: "Change spelling to 'fooo'" },
|
|
|
|
{ description: "Add 'this.' to unresolved variable" },
|
|
|
|
]);
|
2017-09-27 00:16:29 +02:00
|
|
|
verify.codeFix({
|
2018-07-21 01:51:35 +02:00
|
|
|
index: 2,
|
2017-12-02 01:38:59 +01:00
|
|
|
description: "Add 'this.' to unresolved variable",
|
2017-09-27 00:16:29 +02:00
|
|
|
newRangeContent: `
|
2017-03-15 19:44:36 +01:00
|
|
|
this.foo = 10;
|
2017-09-27 00:16:29 +02:00
|
|
|
`
|
|
|
|
});
|