fix: Exclude emotion's css prop from exported typedefs#468
Merged
frankieyan merged 1 commit intobetafrom Mar 11, 2021
Merged
Conversation
henningmu
approved these changes
Mar 11, 2021
Contributor
henningmu
left a comment
There was a problem hiding this comment.
I couldn't reproduce the original error when linking beta into Todoist but I also can't see it with this change. Your explanations and the change make a lot of sense so I'll give my approval here 🙌
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
When using the Button component from the latest beta releases, a mysterious
cssprop has been declared as required. This turns out to be a merged interface on bothReact.DOMAttributesandJSX. IntrinsicAttributesfrom emotion 10, which is included in Storybook:https://github.com/emotion-js/emotion/blob/ab535a8c7a0dcbbb6af310634eb3cee4bc2f8e2c/packages/core/types/index.d.ts#L86
The solution now seems to be to omit anything storybook-related from the output. As our stories still need to be type-checked during development, they are only excluded in
tsconfig.dist.jsonTest Plan
npm run build. In another project that has Reactist installed, runnpm link ../reactistButtoncomponent in the project and let type-checking run, either in your editor or with tsc. You should now see thecssprop errorscsspropOutput diff showing the
cssprop no longer present in the Button and Dropdown components:PR Checklist
npm run validateand made sure no errors / warnings were shownCHANGELOG.mdpackage.jsonandpackage-lock.json(npm --no-git-tag-version version <major|minor|patch>) refnpm run build-all)Versioning
Released together with #467 under v9.1.0-beta.2