kiliman / remix-typedjson

This package is a replacement for superjson to use in your Remix app. It handles a subset of types that `superjson` supports, but is faster and smaller.
MIT License
435 stars 19 forks source link

Required `TypedJsonResponse` to be exported #10

Closed jmaldon1 closed 1 year ago

jmaldon1 commented 1 year ago

Hello,

I am using an ESlint rule that requires me to explicitly set my function return types. So I need to type the return of my loader function.

Example:

const loader: ({ request, params }: LoaderArgs) => Promise<TypedJsonResponse<LoaderData>>

It doesn't seem that TypedJsonResponse is importable from this library making it not possible to explicitly set the return type.