Skip to content

Commit 2efe465

Browse files
committed
Changed the usage of @note in the docstring
1 parent 80f5c69 commit 2efe465

File tree

1 file changed

+62
-62
lines changed

1 file changed

+62
-62
lines changed

packages/batch/src/types.ts

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ type BatchProcessingOptions<T = BasePartialBatchProcessor> = {
3434
* If true skip the group on error during processing.
3535
*/
3636
skipGroupOnError?: T extends
37-
| SqsFifoPartialProcessor
38-
| SqsFifoPartialProcessorAsync
39-
? boolean
40-
: never;
37+
| SqsFifoPartialProcessor
38+
| SqsFifoPartialProcessorAsync
39+
? boolean
40+
: never;
4141
/**
4242
* Set this to false to prevent throwing an error if the entire batch fails.
4343
*/
@@ -48,10 +48,10 @@ type BatchProcessingOptions<T = BasePartialBatchProcessor> = {
4848
* When set to `false`, the records will be processed sequentially.
4949
*/
5050
processInParallel?: T extends
51-
| SqsFifoPartialProcessor
52-
| SqsFifoPartialProcessorAsync
53-
? never
54-
: boolean;
51+
| SqsFifoPartialProcessor
52+
| SqsFifoPartialProcessorAsync
53+
? never
54+
: boolean;
5555
};
5656

5757
/**
@@ -111,7 +111,7 @@ type PartialItemFailureResponse = { batchItemFailures: PartialItemFailures[] };
111111
*
112112
* You can optionally pass a `logger` for debug and warning messages.
113113
*
114-
* @note `innerSchema` supports only Zod schemas, while `schema` supports any Standard Schema-compatible parsing library.
114+
* Note: `innerSchema` supports only Zod schemas, while `schema` supports any Standard Schema-compatible parsing library.
115115
*
116116
* @property parser - Required when using schema parsing (import from `@aws-lambda-powertools/batch/parser`)
117117
* @property schema - Complete event schema (mutually exclusive with innerSchema)
@@ -121,50 +121,50 @@ type PartialItemFailureResponse = { batchItemFailures: PartialItemFailures[] };
121121
*/
122122
type BasePartialBatchProcessorParserConfig =
123123
| {
124-
/**
125-
* Required when using schema parsing - import from `@aws-lambda-powertools/batch/parser`
126-
*/
127-
parser: typeof parser;
128-
/**
129-
* Complete event schema using Standard Schema specification, mutually exclusive with `innerSchema`
130-
*/
131-
schema: StandardSchemaV1;
132-
innerSchema?: never;
133-
transformer?: never;
134-
/**
135-
* Optional logger for debug and warning messages
136-
*/
137-
logger?: Pick<GenericLogger, 'debug' | 'warn' | 'error'>;
138-
}
124+
/**
125+
* Required when using schema parsing - import from `@aws-lambda-powertools/batch/parser`
126+
*/
127+
parser: typeof parser;
128+
/**
129+
* Complete event schema using Standard Schema specification, mutually exclusive with `innerSchema`
130+
*/
131+
schema: StandardSchemaV1;
132+
innerSchema?: never;
133+
transformer?: never;
134+
/**
135+
* Optional logger for debug and warning messages
136+
*/
137+
logger?: Pick<GenericLogger, 'debug' | 'warn' | 'error'>;
138+
}
139139
| {
140-
/**
141-
* Required when using schema parsing - import from `@aws-lambda-powertools/batch/parser`
142-
*/
143-
parser: typeof parser;
144-
schema?: never;
145-
/**
146-
* Payload-only Zod schema, mutually exclusive with `schema`
147-
*/
148-
innerSchema: ZodType;
149-
/**
150-
* Payload transformer, only available with `innerSchema`
151-
*/
152-
transformer?: 'json' | 'base64' | 'unmarshall';
153-
/**
154-
* Optional logger for debug and warning messages
155-
*/
156-
logger?: Pick<GenericLogger, 'debug' | 'warn' | 'error'>;
157-
}
140+
/**
141+
* Required when using schema parsing - import from `@aws-lambda-powertools/batch/parser`
142+
*/
143+
parser: typeof parser;
144+
schema?: never;
145+
/**
146+
* Payload-only Zod schema, mutually exclusive with `schema`
147+
*/
148+
innerSchema: ZodType;
149+
/**
150+
* Payload transformer, only available with `innerSchema`
151+
*/
152+
transformer?: 'json' | 'base64' | 'unmarshall';
153+
/**
154+
* Optional logger for debug and warning messages
155+
*/
156+
logger?: Pick<GenericLogger, 'debug' | 'warn' | 'error'>;
157+
}
158158
| {
159-
parser?: never;
160-
schema?: never;
161-
innerSchema?: never;
162-
transformer?: never;
163-
/**
164-
* Optional logger for debug and warning messages
165-
*/
166-
logger?: Pick<GenericLogger, 'debug' | 'warn' | 'error'>;
167-
};
159+
parser?: never;
160+
schema?: never;
161+
innerSchema?: never;
162+
transformer?: never;
163+
/**
164+
* Optional logger for debug and warning messages
165+
*/
166+
logger?: Pick<GenericLogger, 'debug' | 'warn' | 'error'>;
167+
};
168168

169169
/**
170170
* Utility type for creating typed record handlers with custom payload schemas.
@@ -227,17 +227,17 @@ type ParsedRecord<TRecord, TPayload, TOldPayload = TPayload> = TRecord extends {
227227
}
228228
? Omit<TRecord, 'body'> & { body: TPayload }
229229
: TRecord extends { kinesis: { data: string } }
230-
? Omit<TRecord, 'kinesis'> & {
231-
kinesis: Omit<TRecord['kinesis'], 'data'> & { data: TPayload };
232-
}
233-
: TRecord extends { dynamodb?: StreamRecord }
234-
? Omit<TRecord, 'dynamodb'> & {
235-
dynamodb: Omit<StreamRecord, 'NewImage' | 'OldImage'> & {
236-
NewImage: TPayload;
237-
OldImage: TOldPayload;
238-
};
239-
}
240-
: TRecord;
230+
? Omit<TRecord, 'kinesis'> & {
231+
kinesis: Omit<TRecord['kinesis'], 'data'> & { data: TPayload };
232+
}
233+
: TRecord extends { dynamodb?: StreamRecord }
234+
? Omit<TRecord, 'dynamodb'> & {
235+
dynamodb: Omit<StreamRecord, 'NewImage' | 'OldImage'> & {
236+
NewImage: TPayload;
237+
OldImage: TOldPayload;
238+
};
239+
}
240+
: TRecord;
241241

242242
export type {
243243
BatchProcessingOptions,

0 commit comments

Comments
 (0)