905f9a02ad
* Make `module.export =` an alias like `export=` is This breaks a couple of tests for previous workarounds. Fix in upcoming commits. * Basically fixes all the breaks, but needs cleanup * More notes to myself * Clean up TODOs * Call mergeSymbolTable and delete export= afterward instead of basically copying the code myself. * More cleanup * Remove unnecessary check in import type checking * Revert to DIY code. It is more correct and will go away in a few days. * Exported class expressions can be used as type In both JS and TS * Do not require named class expressions
17 lines
599 B
TypeScript
17 lines
599 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @allowJs: true
|
|
|
|
// @Filename: /a.js
|
|
////module.exports = class [|{| "isWriteAccess": true, "isDefinition": true |}A|] {};
|
|
|
|
// @Filename: /b.js
|
|
////import [|{| "isWriteAccess": true, "isDefinition": true |}A|] = require("./a");
|
|
////[|A|];
|
|
|
|
const [r0, r1, r2] = test.ranges();
|
|
const defs = { definition: "(local class) A", ranges: [r0] };
|
|
const imports = { definition: '(alias) (local class) A\nimport A = require("./a")', ranges: [r1, r2] };
|
|
verify.referenceGroups([r0], [defs, imports]);
|
|
verify.referenceGroups([r1, r2], [imports, defs]);
|
|
|