You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output should be the same as if compiling the equivalent older TS:
import*as_from'lodash-es';export{_}
i.e. the compiled Javascript should be:
"use strict";Object.defineProperty(exports,"__esModule",{value: true});consttslib_1=require("tslib");// export * as _ from 'lodash-es';const_=tslib_1.__importStar(require("lodash-es"));exports._=_;
The Typescript Playground doesn't support importHelpers, and the analogue noEmitHelpers doesn't cause this behaviour; I don't believe it's possible to reproduce this issue using the Playground.
Related Issues:
The similar issues search pointed me at #21560 and #27415 which also mention import helpers being inlined in different edge cases. Seeing as export-as isn't a dynamic import, and the older issue related to regular imports is closed, this seems to be a different, possibly related issue.
The text was updated successfully, but these errors were encountered:
We should be treating export * as ns from ... the same as import * as ns from ... in collectExternalModuleInfo. I should have a fix up shortly.
@lotz: I'm not certain whether your issue is related, and may have been fixed by #38808. Can you verify whether that is the case, and if not, can you provide a specific repro for your case?
TypeScript Version: Version 3.9.0-dev.20200228
Search Terms:
export as importhelpers
export as importstar
export as helper
Code
compiled with the following configuration:
Expected behavior:
The output should be the same as if compiling the equivalent older TS:
i.e. the compiled Javascript should be:
Actual behavior:
The helper functions are emitted:
Playground Link:
The Typescript Playground doesn't support
importHelpers
, and the analoguenoEmitHelpers
doesn't cause this behaviour; I don't believe it's possible to reproduce this issue using the Playground.Related Issues:
The similar issues search pointed me at #21560 and #27415 which also mention import helpers being inlined in different edge cases. Seeing as export-as isn't a dynamic import, and the older issue related to regular imports is closed, this seems to be a different, possibly related issue.
The text was updated successfully, but these errors were encountered: