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