Phil
Phil
Explore posts from servers
HHono
Created by Phil on 5/31/2024 in #help
[zod, bun]#openapi async/await doesn't work
Argument of type '(c: Context<Env, "/:identifier", { in: { param: { identifier?: string; }; }; out: { param: { identifier?: string; }; }; }>) => Promise<Response>' is not assignable to parameter of type 'Handler<Env, "/:identifier", { in: { param: { identifier?: string; }; }; out: { param: { identifier?: string; }; }; }, MaybePromise<TypedResponse<{ id?: number; identifier?: string; features?: { featureX?: boolean; featureY?: number; }; }, 200, "json">>>'.
Type 'Promise<Response>' is not assignable to type 'MaybePromise<TypedResponse<{ id?: number; identifier?: string; features?: { featureX?: boolean; featureY?: number; }; }, 200, "json">>'.
Type 'Promise<Response>' is not assignable to type 'Promise<TypedResponse<{ id?: number; identifier?: string; features?: { featureX?: boolean; featureY?: number; }; }, 200, "json">>'.
Type 'Response' is missing the following properties from type 'TypedResponse<{ id?: number; identifier?: string; features?: { featureX?: boolean; featureY?: number; }; }, 200, "json">': data, formatts(2345)
Argument of type '(c: Context<Env, "/:identifier", { in: { param: { identifier?: string; }; }; out: { param: { identifier?: string; }; }; }>) => Promise<Response>' is not assignable to parameter of type 'Handler<Env, "/:identifier", { in: { param: { identifier?: string; }; }; out: { param: { identifier?: string; }; }; }, MaybePromise<TypedResponse<{ id?: number; identifier?: string; features?: { featureX?: boolean; featureY?: number; }; }, 200, "json">>>'.
Type 'Promise<Response>' is not assignable to type 'MaybePromise<TypedResponse<{ id?: number; identifier?: string; features?: { featureX?: boolean; featureY?: number; }; }, 200, "json">>'.
Type 'Promise<Response>' is not assignable to type 'Promise<TypedResponse<{ id?: number; identifier?: string; features?: { featureX?: boolean; featureY?: number; }; }, 200, "json">>'.
Type 'Response' is missing the following properties from type 'TypedResponse<{ id?: number; identifier?: string; features?: { featureX?: boolean; featureY?: number; }; }, 200, "json">': data, formatts(2345)
10 replies