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
//npm install --save [email protected]//`ts-node ./index.ts` works fine//`tsc` gives `Maximum call stack size exceeded`//`"type-mapping/fluent"` is a file that uses `export =`//to export an object with many propertiesimport*astmfrom"type-mapping/fluent";console.log(tm);
This works fine,
//npm install --save [email protected]//`ts-node ./index.ts` works fine//`tsc` also works fine//`"type-mapping"` is a file that uses `export *`//to export many objects, even more than "type-mapping/fluent"import*astmfrom"type-mapping";console.log(tm);
Expected behavior:
tsc should compile fine in both cases.
"type-mapping/fluent" uses export = to export a single object with many properties (141 properties).
However, the number of "things" exported is less than the amount exported
by "type-mapping", which uses export * (178, excluding interfaces and typedefs).
So, this makes me suspect that the problem is export =.
However, I simply have to use export = because "type-mapping/fluent" is generating these properties during run-time. (During compile-time, the export is a mapped object type)
Actual behavior:
Maximum call stack size exceeded with "type-mapping/fluent" and export =.
Works fine with "type-mapping" and export *
Related Issues: Not that I could find
The text was updated successfully, but these errors were encountered:
If I want to convert this to export *, I have to manually copy-paste code (and tweak) for possibly 100+ functions.
I've also noticed that when I use import * as tm from "type-mapping/fluent";, VS code will hang for a bit at times. And then I get an error saying the TS extension has crashed.
Restarting VS code lets it run fine again for a while before crashing again.
So, fluent-lib/non-generic.ts still does its run-time wrapping of 100+ functions, and uses export =
But fluent-lib/index.ts uses export {/*list of function names*/} from "./non-generic";.
This way, I side-step the issue
I just published as version 1.1.5 and tested it and it seems to work without crashing now.
I'll have to test some more and see if there are any lingering side-effects.
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 3.5.1
Search Terms: import, export assignment,
export =
, call stackCode
This crashes
tsc
,This works fine,
Expected behavior:
tsc
should compile fine in both cases."type-mapping/fluent"
usesexport =
to export a single object with many properties (141 properties).However, the number of "things" exported is less than the amount exported
by
"type-mapping"
, which usesexport *
(178, excluding interfaces and typedefs).So, this makes me suspect that the problem is
export =
.However, I simply have to use
export =
because"type-mapping/fluent"
is generating these properties during run-time. (During compile-time, the export is a mapped object type)Actual behavior:
Maximum call stack size exceeded
with"type-mapping/fluent"
andexport =
.Works fine with
"type-mapping"
andexport *
Related Issues: Not that I could find
The text was updated successfully, but these errors were encountered: