1 | import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface';
|
2 | import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util';
|
3 | export interface ParseBoolPipeOptions {
|
4 | errorHttpStatusCode?: ErrorHttpStatusCode;
|
5 | exceptionFactory?: (error: string) => any;
|
6 | }
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export declare class ParseBoolPipe implements PipeTransform<string | boolean, Promise<boolean>> {
|
15 | protected exceptionFactory: (error: string) => any;
|
16 | constructor(options?: ParseBoolPipeOptions);
|
17 | /**
|
18 | * Method that accesses and performs optional transformation on argument for
|
19 | * in-flight requests.
|
20 | *
|
21 | * @param value currently processed route argument
|
22 | * @param metadata contains metadata about the currently processed route argument
|
23 | */
|
24 | transform(value: string | boolean, metadata: ArgumentMetadata): Promise<boolean>;
|
25 | }
|