Replies: 1 comment
-
Not a bug, just weirdness of current typings and TS. The signatures are a mess and will get fixed at a later date, but not without a breaking change etc. You can do this for now: import type { RequestDocument, Variables } from '../src/entrypoints/main.js'
import request from '../src/entrypoints/main.js'
export const requestWrapper = <T, V extends Variables = Variables>(
document: RequestDocument,
variables: V,
// ) => request<T, V>('/api/graphql', document, variables)
) => request<T>(`/api/graphql`, document, variables) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
This code
gives me this error:
Though unless I am missing something, the typing should work just fine. Is there anything I am doing wrong, or is something up with the typing?
Beta Was this translation helpful? Give feedback.
All reactions