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

Core data: Expand type signature of useQuerySelect #39656

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

dmsnell
Copy link
Member

@dmsnell dmsnell commented Mar 22, 2022

What?

Part of #39211

In this patch we're expanding the type signature of useQuerySelect
and fixing a minor type-related issue that was formerly there.

We want to do great things with the core-data type system but all of these
little nuisances get in the way when we're trying to study those things in
isolation. This is a preparatory change to eliminate some of the noise in the
existing types.

Testing

As a type-only change this will have no impact on the built code.
Please audit the types and the use of the wrapper EnrichedSelectors.

Part of #39211

In this patch we're expanding the type signature of `useQuerySelect`
and fixing a minor type-related issue that was formerly there.

We want to do great things with the `core-data` type system but all of these
little nuisances get in the way when we're trying to study those things in
isolation. This is a preparatory change to eliminate some of the noise in the
existing types.

As a type-only change this will have no impact on the built code.
Please audit the types and the use of the wrapper `EnrichedSelectors`.
@dmsnell dmsnell requested a review from adamziel March 22, 2022 19:23
@dmsnell dmsnell requested a review from nerrad as a code owner March 22, 2022 19:23
@mtias mtias added the [Package] Core data /packages/core-data label Mar 28, 2022
@adamziel
Copy link
Contributor

This is great, thank you so much! Eventually, this could even rely on a specific Store type and enrich the pre-declared selectors instead of using a Record.

@dmsnell dmsnell merged commit aa3193a into trunk Mar 31, 2022
@dmsnell dmsnell deleted the core-data/fix-typing-issues-use-query-select branch March 31, 2022 18:54
@github-actions github-actions bot added this to the Gutenberg 13.0 milestone Mar 31, 2022
dmsnell added a commit that referenced this pull request Mar 31, 2022
In this commit we're cleaning up type issues in the core-data package
that prevent us from telling TypeScript to run on the package and all
of its existing code, even the JS files.

After these changes we should be able to do so and start converting
more modules to TypeScript with less friction.

This patch follows a series of other smaller updates:
 - #39212
 - #39214
 - #39225
 - #39476
 - #39477
 - #39479
 - #39480
 - #39525
 - #39526
 - #39655
 - #39656
 - #39659

It was built in order to support ongoing work to add types to the
`getEntityRecord` family of functions in #39025.
dmsnell added a commit that referenced this pull request Apr 1, 2022
In this commit we're cleaning up type issues in the core-data package
that prevent us from telling TypeScript to run on the package and all
of its existing code, even the JS files.

After these changes we should be able to do so and start converting
more modules to TypeScript with less friction.

This patch follows a series of other smaller updates:
 - #39212
 - #39214
 - #39225
 - #39476
 - #39477
 - #39479
 - #39480
 - #39525
 - #39526
 - #39655
 - #39656
 - #39659

It was built in order to support ongoing work to add types to the
`getEntityRecord` family of functions in #39025.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Core data /packages/core-data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants