* Add failing tests * Use default import or namespace import for import fixes when compiler options allow * Don’t do import * for export=, ever * Only do import default for export equals if nothing else will work * Never do import/require in a JavaScript file * Update tests for changes in master * Add const/require fix for JS and select based on usage heuristic * Fix JS UMD import
21 lines
423 B
TypeScript
21 lines
423 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
// @AllowSyntheticDefaultImports: false
|
|
// @Module: commonjs
|
|
// @CheckJs: true
|
|
// @AllowJs: true
|
|
|
|
// @Filename: a/f1.js
|
|
//// [|export function test() { };
|
|
//// bar1/*0*/.bar;|]
|
|
|
|
// @Filename: a/foo.d.ts
|
|
//// export declare function bar(): number;
|
|
//// export as namespace bar1;
|
|
|
|
verify.importFixAtPosition([
|
|
`import * as bar1 from "./foo";
|
|
|
|
export function test() { };
|
|
bar1.bar;`
|
|
]); |