Skip to content

Commit 3a6b736

Browse files
committed
revert back to infer result type
1 parent ccdaf26 commit 3a6b736

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: packages/parser/src/envelopes/apigw.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { ZodSchema, z } from 'zod';
22
import { ParseError } from '../errors.js';
33
import { APIGatewayProxyEventSchema } from '../schemas/apigw.js';
4+
import type { ParsedResult } from '../types';
45
import { Envelope } from './envelope.js';
56

67
/**
@@ -11,7 +12,7 @@ export const ApiGatewayEnvelope = {
1112
return Envelope.parse(APIGatewayProxyEventSchema.parse(data).body, schema);
1213
},
1314

14-
safeParse<T extends ZodSchema>(data: unknown, schema: T) {
15+
safeParse<T extends ZodSchema>(data: unknown, schema: T): ParsedResult {
1516
const parsedEnvelope = APIGatewayProxyEventSchema.safeParse(data);
1617
if (!parsedEnvelope.success) {
1718
return {

0 commit comments

Comments
 (0)