Skip to content

fix: export module augmentation for consuming applications #8

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

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

ChristopherChudzicki
Copy link
Collaborator

@ChristopherChudzicki ChristopherChudzicki commented Nov 22, 2024

Description (What does it do?)

Enables smoot-design's module augmentation to work in consuming applications.

How can this be tested?

  1. Run yarn install and yarn storybook, read http://localhost:6006/?path=/docs/smoot-design-themeprovider--docs
  2. Clone https://github.com/mitodl/unified-ecommerce-frontend, checkout branch cc/setup, and observe that in Header.tsx, the theme.custom props come through.

@ChristopherChudzicki ChristopherChudzicki changed the title fix: export module augmentation fix: export module augmentation for consuming applications Nov 22, 2024
@@ -16,7 +16,8 @@
"typecheck": "tsc --noEmit",
"build:esm": "tsc",
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
"build": "rm -rf dist && rm -f .tsbuildinfo && npm run build:esm && npm run build:cjs",
"build:type-augmentation": "cp -r src/type-augmentation dist/type-augmentation",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This exists because Typescript does not by default include any source .d.ts files in the output.

Potentially these could just be .ts files, in whcih case they would be included. But keeping them as .d.ts 100% ensures they have no runtime impact.

Copy link

@shanbady shanbady left a comment

Choose a reason for hiding this comment

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

👍

@ChristopherChudzicki ChristopherChudzicki merged commit bcdafe6 into main Nov 25, 2024
8 checks passed
@ChristopherChudzicki
Copy link
Collaborator Author

🎉 This PR is included in version 1.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants