b2b54cbf5c
* import fix: suggest import..require where supported if synthetic defaults are unavailable * Add tests for import..require fix when targeting CommonJS, AMD, and UMD modules * fix failing tests
22 lines
478 B
TypeScript
22 lines
478 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
// @AllowSyntheticDefaultImports: false
|
|
// @Module: esnext
|
|
|
|
// @Filename: a/f1.ts
|
|
//// [|import { bar } from "./foo";
|
|
////
|
|
//// export function test() { };
|
|
//// bar1/*0*/.bar();|]
|
|
|
|
// @Filename: a/foo.d.ts
|
|
//// export declare function bar(): number;
|
|
//// export as namespace bar1;
|
|
|
|
verify.importFixAtPosition([
|
|
`import { bar } from "./foo";
|
|
import * as bar1 from "./foo";
|
|
|
|
export function test() { };
|
|
bar1.bar();`
|
|
]); |