* Support add new requires * Always use destructuring for requiring default exports * Add more tests * Update existing fourslash tests * Use `getExportsAndPropertiesOfModule` * Add UMD test * Apply suggestions from code review Fix typos Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
27 lines
456 B
TypeScript
27 lines
456 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @module: esnext
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
|
|
// @Filename: /a.js
|
|
////export class C {}
|
|
/////** @typedef {number} T */
|
|
|
|
// @Filename: /b.js
|
|
////C;
|
|
/////** @type {T} */
|
|
////const x = 0;
|
|
|
|
goTo.file("/b.js");
|
|
verify.codeFixAll({
|
|
fixId: "fixMissingImport",
|
|
fixAllDescription: "Add all missing imports",
|
|
newFileContent:
|
|
`import { C } from "./a";
|
|
|
|
C;
|
|
/** @type {import("./a").T} */
|
|
const x = 0;`,
|
|
});
|