This addresses the @ts-ignore found in makeFauxModuleExportsNamespace(), which was renamed from makeFeauxModuleExportsNamespace(), because "féaux" translates to "loyal supporters" and not "fake" or "false" like was presumably intended.
I am not so bold to rename it makeErsatzModuleExportsNamespace(), despite "ersatz" being a wholly superior word to either of the above alternatives.
Anyway, this adds a proper type signature and fixes the return type; the importHook prop of the returned value did not adhere to the definition of ImportHook. Likewise, StaticModuleType demands an exports array.
Given this apparently worked just fine before I changed it, one could argue the types ought to be loosened somewhat.
No, I didn't make an issue
I happened upon the code in question, so I fixed it due to my personal compulsions
No security concerns
No scaling concerns
Modifies a private API
I have low confidence that @kriskowal did not name this function intentionally. If he did, it went over my head.
This addresses the
@ts-ignore
found inmakeFauxModuleExportsNamespace()
, which was renamed frommakeFeauxModuleExportsNamespace()
, because "féaux" translates to "loyal supporters" and not "fake" or "false" like was presumably intended.I am not so bold to rename it
makeErsatzModuleExportsNamespace()
, despite "ersatz" being a wholly superior word to either of the above alternatives.Anyway, this adds a proper type signature and fixes the return type; the
importHook
prop of the returned value did not adhere to the definition ofImportHook
. Likewise,StaticModuleType
demands anexports
array.Given this apparently worked just fine before I changed it, one could argue the types ought to be loosened somewhat.