trpc-openapi
trpc-openapi copied to clipboard
Types errors
When compiling I'm getting type errors on the MiddlewareResult union type. I was also getting type errors from the adapters, I guess because all of them are exported in index? but "skipLibCheck" solved that.
I've only imported OpenApiMeta.
import { OpenApiMeta } from "trpc-openapi";
Error
node_modules/@trpc/server/src/core/internals/procedureBuilder.ts:404:20 - error TS2339: Property 'error' does not exist on type 'MiddlewareResult<any>'.
Property 'error' does not exist on type 'MiddlewareOKResult<any>'.
404 throw result.error;
~~~~~
node_modules/@trpc/server/src/deprecated/internals/procedure.ts:244:20 - error TS2339: Property 'error' does not exist on type 'MiddlewareResult<any>'.
Property 'error' does not exist on type 'MiddlewareOKResult<any>'.
244 throw result.error;
Revert back to the old version (1.1.2) , the latest one introduces dependencies and one of them (not sure which) breaks something.
Also happened with me
also happen with me and take much time to figure out 😅😅