🔎 Search Terms
"importHelpers"
"default exports"
"tslib"
🕗 Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
Can't create playground as multiple files are required to demonstrate
💻 Code
src/exporter.ts:
export default function foo(): boolean {
return true
}
src/index.ts:
export { default as foo } from './exporter'
🙁 Actual behavior
With importHelpers set to true and noEmitHelpers set to false I expect src/index.ts to be compiled to something like:
"use strict";
const tslib_1 = require("tslib");
Object.defineProperty(exports, "__esModule", { value: true });
exports.foo = void 0;
var exporter_1 = require("./exporter");
Object.defineProperty(exports, "foo", { enumerable: true, get: function () { return tslib_1.__importDefault(exporter_1).default; } });
🙂 Expected behavior
src/index.ts is actually compiled to:
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.foo = void 0;
var exporter_1 = require("./exporter");
Object.defineProperty(exports, "foo", { enumerable: true, get: function () { return __importDefault(exporter_1).default; } });
i.e. it appears for an export { default as ... } statement, the importHelpers property is being ignored.
Additional information about the issue
No response
🔎 Search Terms
"importHelpers"
"default exports"
"tslib"
🕗 Version & Regression Information
⏯ Playground Link
Can't create playground as multiple files are required to demonstrate
💻 Code
src/exporter.ts:src/index.ts:🙁 Actual behavior
With
importHelpersset totrueandnoEmitHelpersset to false I expectsrc/index.tsto be compiled to something like:🙂 Expected behavior
src/index.tsis actually compiled to:i.e. it appears for an
export { default as ... }statement, theimportHelpersproperty is being ignored.Additional information about the issue
No response