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

Address new inferrence priority in TS #11

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Address new inferrence priority in TS
bloodyowl committed Oct 15, 2024

Verified

This commit was signed with the committer’s verified signature.
commit b3a1e6a1821230dec4d2329498d91fcb7e5be0eb
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@
"react-dom": "^18.2.0",
"tsup": "^8.0.2",
"tsx": "^4.7.1",
"typescript": "^5.4.3",
"typescript": "^5.6.3",
"vite": "^5.2.7",
"vitest": "^1.4.0"
}
4 changes: 2 additions & 2 deletions src/react/useQuery.ts
Original file line number Diff line number Diff line change
@@ -46,9 +46,9 @@ const usePreviousValue = <A, T extends AsyncData<A>>(value: T): T => {
return previousRef.current;
};

export const useQuery = <Data, Variables>(
export const useQuery = <Data, Variables, InitialVariables extends Variables>(
query: TypedDocumentNode<Data, Variables>,
variables: Variables,
variables: InitialVariables,
{
suspense = false,
optimize = false,
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -5411,10 +5411,10 @@ typed-array-length@^1.0.6:
is-typed-array "^1.1.13"
possible-typed-array-names "^1.0.0"

typescript@^5.4.3:
version "5.4.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff"
integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==
typescript@^5.6.3:
version "5.6.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b"
integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==

ua-parser-js@^1.0.35:
version "1.0.37"