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

[TypeScript] Improve type definitions in @wordpress/core-data #41593

Merged
merged 2 commits into from
Jun 10, 2022

Conversation

adamziel
Copy link
Contributor

@adamziel adamziel commented Jun 8, 2022

What problem does this PR solve

Exporting TypeScript type from @wordpress/core-data requires adding a tsconfig.json to the package. This PR prepares the type definitions so that one can be added without experiencing errors.

Test plan

Confirm all checks are green – there are no runtime changes in this PR, only the type annotations are affected.

@noisysocks @sirreal @dmsnell @sarayourfriend

@adamziel adamziel requested a review from nerrad as a code owner June 8, 2022 09:16
@adamziel adamziel self-assigned this Jun 8, 2022
@adamziel adamziel added [Package] Core data /packages/core-data Developer Experience Ideas about improving block and theme developer experience labels Jun 8, 2022
@adamziel adamziel changed the title Add tsconfig.json to @wordpress/core-data [TypeScript] Add tsconfig.json to @wordpress/core-data Jun 8, 2022
@dmsnell
Copy link
Member

dmsnell commented Jun 8, 2022

Can we separate the type fixes in a distinct PR and then look at adding the tsconfig.json in isolation?

@adamziel adamziel changed the title [TypeScript] Add tsconfig.json to @wordpress/core-data [TypeScript] Improve type definitions in @wordpress/core-data Jun 9, 2022
@adamziel
Copy link
Contributor Author

adamziel commented Jun 9, 2022

@dmsnell done!

@adamziel
Copy link
Contributor Author

adamziel commented Jun 10, 2022

After removing tsconfig.json this is just a small PR cleaning up more-or-less obvious typing mistakes without any runtime changes so I'll just go ahead and merge.

@adamziel adamziel merged commit 72adfa9 into trunk Jun 10, 2022
@adamziel adamziel deleted the ts/add-tsconfig-json-to-core-data branch June 10, 2022 09:51
@github-actions github-actions bot added this to the Gutenberg 13.5 milestone Jun 10, 2022
@mburridge mburridge added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 13, 2022
@mburridge
Copy link
Contributor

Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience Ideas about improving block and theme developer experience Needs Dev Note Requires a developer note for a major WordPress release cycle [Package] Core data /packages/core-data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants