Skip to content

Commit 1e7175a

Browse files
committed
use Parsed instead of Parse for naming
1 parent 95fe284 commit 1e7175a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/parser/src/envelopes/sqs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { ParseError } from '../errors.js';
99
*
1010
* The record's body parameter is a string, though it can also be a JSON encoded string.
1111
* Regardless of its type it'll be parsed into a BaseModel object.
12-
*w
12+
*
1313
* Note: Records will be parsed the same way so if model is str,
1414
* all items in the list will be parsed as str and npt as JSON (and vice versa)
1515
*/

packages/parser/src/middleware/parser.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type MiddyLikeRequest } from '@aws-lambda-powertools/commons/types';
22
import { type MiddlewareObj } from '@middy/core';
33
import { ZodType } from 'zod';
4-
import type { ParserOptions, ParseOutput } from '../types/parser.js';
4+
import type { ParserOptions, ParserOutput } from '../types/parser.js';
55
import { parse } from '../parser.js';
66
import type { Envelope } from '../types/envelope.js';
77

@@ -39,7 +39,7 @@ const parser = <
3939
TSafeParse extends boolean = false,
4040
>(
4141
options: ParserOptions<TSchema, TEnvelope, TSafeParse>
42-
): MiddlewareObj<ParseOutput<TSchema, TEnvelope, TSafeParse>> => {
42+
): MiddlewareObj<ParserOutput<TSchema, TEnvelope, TSafeParse>> => {
4343
const before = (request: MiddyLikeRequest): void => {
4444
const { schema, envelope, safeParse } = options;
4545

packages/parser/src/parserDecorator.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Context, Handler } from 'aws-lambda';
33
import { type ZodSchema } from 'zod';
44
import { parse } from './parser.js';
55
import type { ParserOptions, Envelope } from './types/index.js';
6-
import type { ParseOutput } from './types/parser.js';
6+
import type { ParserOutput } from './types/parser.js';
77

88
/**
99
* A decorator to parse your event.
@@ -82,7 +82,7 @@ export const parser = <
8282

8383
descriptor.value = async function (
8484
this: Handler,
85-
event: ParseOutput<TSchema, TEnvelope, TSafeParse>,
85+
event: ParserOutput<TSchema, TEnvelope, TSafeParse>,
8686
context: Context,
8787
callback
8888
) {

packages/parser/src/types/parser.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type ZodInferredSafeParseResult<
6262
/**
6363
* The output of the parser function, can be either schema inferred type or a ParsedResult
6464
*/
65-
type ParseOutput<
65+
type ParserOutput<
6666
TSchema extends ZodSchema,
6767
TEnvelope extends Envelope,
6868
TSafeParse = false,
@@ -79,5 +79,5 @@ export type {
7979
ParsedResult,
8080
ParsedResultError,
8181
ParsedResultSuccess,
82-
ParseOutput,
82+
ParserOutput,
8383
};

0 commit comments

Comments
 (0)