You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created a React hook that wraps genql. I get TS auto-complete as expected. However, I don't get any TS errors when adding keys that don't exist (e.g. query: { somethingUnknown: true } won't cause TS errors but will cause the query to fail (obviously). It would be good if generated types would include e.g. [key: string]: never to cause TS to throw errors when requesting keys that don't exist. E.g.
This should be solvable, even more so now. Prisma Client used type helpers back when to make it happen, but IIUC its easier now thanks to TS changes mentioned in linked issue.
I've created a React hook that wraps genql. I get TS auto-complete as expected. However, I don't get any TS errors when adding keys that don't exist (e.g.
query: { somethingUnknown: true }
won't cause TS errors but will cause the query to fail (obviously). It would be good if generated types would include e.g.[key: string]: never
to cause TS to throw errors when requesting keys that don't exist. E.g.Here's my hook for reference:
The text was updated successfully, but these errors were encountered: