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

Adds version compatibility checks to Queries #521

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

ericanderson
Copy link
Member

@ericanderson ericanderson commented Jul 24, 2024

Additionally, I have added mapped description to query params and a TEST!! to ensure we don't break it.

Fixes #505

@ericanderson ericanderson force-pushed the ea/query-versionbound branch from bb60e34 to 65aee7e Compare July 24, 2024 20:54
@ericanderson ericanderson force-pushed the ea/query-versionbound branch from 65aee7e to 9a4d09b Compare July 25, 2024 18:45
});

it("callsQueryAcceptsObject", { timeout: 10_000 }, async () => {
const { resp } = await tsServer.sendQuickInfoRequest({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty cool, so how do you imagine we'd expand these types of tests? I'm just trying to understand the scope of things we'd be looking for

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is how vscode does stuff basically so anything you can visually see in vscode we can test this way

@@ -45,7 +45,7 @@ export type QuerySignatureFromDef<T extends QueryDefinition<any, any>> =

export type QueryParameterType<
T extends Record<any, QueryDataTypeDefinition<any, any>>,
> = NOOP<PartialByNotStrict<NotOptionalParams<T>, OptionalQueryParams<T>>>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the NOOP? I remember when you explained this to me, it was to help expand the type out right,e.g. when you hovered over it, or am I misremembering?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOOP, while producing a simpler intellisense was also stripping out the mapped jsdoc. We will have to find another way possibly!

@ericanderson ericanderson merged commit 5a41e5e into main Jul 30, 2024
7 checks passed
@ericanderson ericanderson deleted the ea/query-versionbound branch July 30, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add VersionBound to queries
2 participants