Replies: 1 comment
-
Not very automated, but you can try this: https://transform.tools/json-to-typescript |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Does SWR have a best practice for generating typescript def files? I want to type my queries using generated types something like:
const { data } = useSWR<GENERATED_TYPE_RESP, GENERATED_TYPE_VARS>(...)
With Google, I found the graphql code gen SWR plugin. However, I wanted to ask someone with SWR experience their thoughts for generating types?
Thank you!
-matt
(Working on my first project with SWR, in the past i've worked on projects with Apollo & Relay)
Beta Was this translation helpful? Give feedback.
All reactions