-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Primitives: Add types #21482
Primitives: Add types #21482
Changes from all commits
940b1ee
617608d
9fdd71e
20c1bf8
91c64bf
6fd2513
713e631
b5a6668
1de5d3a
7539780
a256aaf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## Master | ||
|
||
Include TypeScript type declarations ([#21482](https://github.com/WordPress/gutenberg/pull/21482)) | ||
|
||
## 1.0.0 | ||
|
||
Initial release. |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,9 @@ | ||||||||
{ | ||||||||
"extends": "../../tsconfig.base.json", | ||||||||
"compilerOptions": { | ||||||||
"rootDir": "src", | ||||||||
"declarationDir": "build-types" | ||||||||
}, | ||||||||
"include": [ "src/**/*" ], | ||||||||
"references": [ { "path": "../element" } ] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's the only project reference we need 👍 gutenberg/packages/primitives/package.json Lines 27 to 29 in 7539780
|
||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The React declarations require this change, these props are typed as booleans. I checked in a code sandbox and the following confirms this should produce the same HTML.
This JSX:
Produces this HTML:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking!