TypeScript/tests/cases/fourslash/importNameCodeFix_importType.ts
Andy 0227997fa5
Use import().T for import completions/fixes of pure types in JS files (#25852)
* Use `import().T` for import completions/fixes of pure types in JS files

* Don't call tryUseExistingNamespaceImport if position undefined
2018-07-26 16:16:57 -07:00

18 lines
300 B
TypeScript

/// <reference path='fourslash.ts' />
// @allowJs: true
// @checkJs: true
// @Filename: /a.js
////export {};
/////** @typedef {number} T */
// @Filename: /b.js
/////** @type {T} */
////const x = 0;
goTo.file("/b.js");
verify.importFixAtPosition([
`/** @type {import("./a").T} */
const x = 0;`]);