1 | import { Type } from '../interfaces';
|
2 | import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface';
|
3 | import { ValidationPipe, ValidationPipeOptions } from './validation.pipe';
|
4 |
|
5 |
|
6 |
|
7 | export interface ParseArrayOptions extends Omit<ValidationPipeOptions, 'transform' | 'validateCustomDecorators' | 'exceptionFactory'> {
|
8 | items?: Type<unknown>;
|
9 | separator?: string;
|
10 | optional?: boolean;
|
11 | exceptionFactory?: (error: any) => any;
|
12 | }
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare class ParseArrayPipe implements PipeTransform {
|
21 | protected readonly options: ParseArrayOptions;
|
22 | protected readonly validationPipe: ValidationPipe;
|
23 | protected exceptionFactory: (error: string) => any;
|
24 | constructor(options?: ParseArrayOptions);
|
25 | /**
|
26 | * Method that accesses and performs optional transformation on argument for
|
27 | * in-flight requests.
|
28 | *
|
29 | * @param value currently processed route argument
|
30 | * @param metadata contains metadata about the currently processed route argument
|
31 | */
|
32 | transform(value: any, metadata: ArgumentMetadata): Promise<any>;
|
33 | protected isExpectedTypePrimitive(): boolean;
|
34 | protected validatePrimitive(originalValue: any, index?: number): any;
|
35 | }
|