Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(compartment-mapper): fix type of internal function #1994

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

boneskull
Copy link
Contributor

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 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.
@boneskull boneskull added the devex developer experience label Jan 22, 2024
@boneskull boneskull requested a review from kriskowal January 22, 2024 23:40
@boneskull boneskull self-assigned this Jan 22, 2024
Copy link
Member

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider makeFauxBespokeErsatzModuleExportsNamespace. And, don’t let your guard down. I do occasionally leave language trust-falls. One time, someone (rightly) corrected “treble” to “triple” in one of my design docs and @peats-bond did me a solid: “resolved: won’t fix”.

@kriskowal kriskowal merged commit 004eff5 into master Jan 23, 2024
14 checks passed
@kriskowal kriskowal deleted the boneskull/faux-not-feaux branch January 23, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex developer experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants