Closed
Description
π Search Terms
JavaScript emit commonjs
π Version & Regression Information
- This changed between versions 5.4 and 5.5beta
β― Playground Link
π» Code
function getProgram(source: string) {}
export { getProgram }
π Actual behavior
The following js is generated:
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProgram = void 0;
function getProgram(source) { }
This does not actually add the function to the export. So when importing getProgram
it will be undefined.
π Expected behavior
Emit should be the same as 5.4 where the function is actually exported:
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProgram = void 0;
function getProgram(source) { }
exports.getProgram = getProgram;
Additional information about the issue
This seems to affect only function declarations. Variables, classes seem to be exported correctly.
Metadata
Metadata
Assignees
Labels
No labels