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 | export interface ParseFloatPipeOptions {
|
5 | errorHttpStatusCode?: ErrorHttpStatusCode;
|
6 | exceptionFactory?: (error: string) => any;
|
7 | }
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare class ParseFloatPipe implements PipeTransform<string> {
|
16 | protected exceptionFactory: (error: string) => any;
|
17 | constructor(options?: ParseFloatPipeOptions);
|
18 | /**
|
19 | * Method that accesses and performs optional transformation on argument for
|
20 | * in-flight requests.
|
21 | *
|
22 | * @param value currently processed route argument
|
23 | * @param metadata contains metadata about the currently processed route argument
|
24 | */
|
25 | transform(value: string, metadata: ArgumentMetadata): Promise<number>;
|
26 | /**
|
27 | * @param value currently processed route argument
|
28 | * @returns `true` if `value` is a valid float number
|
29 | */
|
30 | protected isNumeric(value: string): boolean;
|
31 | }
|