1 | import { ArgumentMetadata } from '../index';
|
2 | import { PipeTransform } from '../interfaces/features/pipe-transform.interface';
|
3 | import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util';
|
4 |
|
5 |
|
6 |
|
7 | export interface ParseFloatPipeOptions {
|
8 | errorHttpStatusCode?: ErrorHttpStatusCode;
|
9 | exceptionFactory?: (error: string) => any;
|
10 | optional?: boolean;
|
11 | }
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare class ParseFloatPipe implements PipeTransform<string> {
|
20 | protected readonly options?: ParseFloatPipeOptions;
|
21 | protected exceptionFactory: (error: string) => any;
|
22 | constructor(options?: ParseFloatPipeOptions);
|
23 | /**
|
24 | * Method that accesses and performs optional transformation on argument for
|
25 | * in-flight requests.
|
26 | *
|
27 | * @param value currently processed route argument
|
28 | * @param metadata contains metadata about the currently processed route argument
|
29 | */
|
30 | transform(value: string, metadata: ArgumentMetadata): Promise<number>;
|
31 | /**
|
32 | * @param value currently processed route argument
|
33 | * @returns `true` if `value` is a valid float number
|
34 | */
|
35 | protected isNumeric(value: string): boolean;
|
36 | }
|