cah4a / trpc-bun-adapter

Use tRPC with bun and fun
https://www.npmjs.com/package/trpc-bun-adapter
MIT License
37 stars 5 forks source link

Types mismatches for tRPC +11.0.0-rc455 #7

Closed lunacrafts closed 1 month ago

lunacrafts commented 2 months ago

Hey guys, thanks for creating and maintaining this package.

I'm having following typescript errors for the latest trpc version '@trpc/client': 11.0.0-rc.466 '@trpc/server': 11.0.0-rc.466

but I recall it don't work for last at least two weeks.

Argument of type '{ endpoint: string; router: BuiltRouter<{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }, { ping: QueryProcedure<{ input: void; output: string; }>; subscribe: SubscriptionProcedure<...>; }>; }' is not assignable to parameter of type 'BunHttpHandlerOptions<BuiltRouter<{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }, { ping: QueryProcedure<{ input: void; output: string; }>; subscribe: SubscriptionProcedure<...>; }>>'. Property 'req' is missing in type '{ endpoint: string; router: BuiltRouter<{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }, { ping: QueryProcedure<{ input: void; output: string; }>; subscribe: SubscriptionProcedure<...>; }>; }' but required in type '{ req: Request; endpoint: string; }'.ts(2345)

cah4a commented 1 month ago

Hey @lunacrafts,

Thanks you for contribution and patience. I've fixed typings and publish package version 1.1.2.

lunacrafts commented 1 month ago

Let's gooo! Thank you! 🥳