wobsoriano / trpc-nuxt

End-to-end typesafe APIs in Nuxt applications.
trpc-nuxt.vercel.app
MIT License
687 stars 39 forks source link

useQuery data type not nullable #113

Closed Blechlawine closed 1 year ago

Blechlawine commented 1 year ago

In Nuxt 3.5.1 the return type of useAsyncData was changed and is not nullable by default anymore. we should define it as nullable in our types: https://github.com/wobsoriano/trpc-nuxt/blob/adeb5a5afdd4ebde7743ca9e16148a0f134cb448/src/client/types.ts#L63

should be:

... AsyncData<PickFrom<DataT, PickKeys> | null, DataE>
wobsoriano commented 1 year ago

Hey, thanks! Would you like to open a PR?