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