2018-01-09 01:36:23 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
// @esModuleInterop: true
|
|
|
|
// @module: amd
|
|
|
|
// @Filename: foo.d.ts
|
|
|
|
////declare function foo(): void;
|
|
|
|
////declare namespace foo {}
|
|
|
|
////export = foo;
|
|
|
|
|
|
|
|
// @Filename: index.ts
|
2018-06-15 19:54:36 +02:00
|
|
|
////import * as foo from "./foo";
|
2018-01-09 01:36:23 +01:00
|
|
|
////function invoke(f: () => void) { f(); }
|
2018-06-15 19:54:36 +02:00
|
|
|
////invoke([|foo|]);
|
2018-01-09 01:36:23 +01:00
|
|
|
|
|
|
|
goTo.file(1);
|
|
|
|
verify.codeFix({
|
|
|
|
description: `Replace import with 'import foo from "./foo";'.`,
|
2018-06-15 19:54:36 +02:00
|
|
|
newFileContent: `import foo from "./foo";
|
|
|
|
function invoke(f: () => void) { f(); }
|
|
|
|
invoke(foo);`,
|
2018-01-09 01:36:23 +01:00
|
|
|
index: 0,
|
|
|
|
});
|