Skip to content

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

Merged
adamziel merged 2 commits into
trunkfrom
ts/add-tsconfig-json-to-core-data
Jun 10, 2022
Merged

adamziel merged 2 commits into
trunkfrom
ts/add-tsconfig-json-to-core-data

Conversation

@adamziel

@adamziel adamziel commented Jun 8, 2022 •

Copy link
Copy Markdown
Contributor

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

dmsnell commented Jun 8, 2022

Copy link
Copy Markdown
Member

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

adamziel commented Jun 9, 2022

Copy link
Copy Markdown
Contributor Author

@dmsnell done!

@adamziel

adamziel commented Jun 10, 2022 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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