1 | import { ClassTransformOptions } from './interfaces';
|
2 | import { ClassConstructor } from './interfaces';
|
3 | export declare class ClassTransformer {
|
4 | |
5 |
|
6 |
|
7 | instanceToPlain<T extends Record<string, any>>(object: T, options?: ClassTransformOptions): Record<string, any>;
|
8 | instanceToPlain<T extends Record<string, any>>(object: T[], options?: ClassTransformOptions): Record<string, any>[];
|
9 | |
10 |
|
11 |
|
12 |
|
13 |
|
14 | classToPlainFromExist<T extends Record<string, any>, P>(object: T, plainObject: P, options?: ClassTransformOptions): T;
|
15 | classToPlainFromExist<T extends Record<string, any>, P>(object: T, plainObjects: P[], options?: ClassTransformOptions): T[];
|
16 | |
17 |
|
18 |
|
19 | plainToInstance<T extends Record<string, any>, V extends Array<any>>(cls: ClassConstructor<T>, plain: V, options?: ClassTransformOptions): T[];
|
20 | plainToInstance<T extends Record<string, any>, V>(cls: ClassConstructor<T>, plain: V, options?: ClassTransformOptions): T;
|
21 | |
22 |
|
23 |
|
24 |
|
25 |
|
26 | plainToClassFromExist<T extends Record<string, any>, V extends Array<any>>(clsObject: T, plain: V, options?: ClassTransformOptions): T;
|
27 | plainToClassFromExist<T extends Record<string, any>, V>(clsObject: T, plain: V, options?: ClassTransformOptions): T[];
|
28 | |
29 |
|
30 |
|
31 | instanceToInstance<T>(object: T, options?: ClassTransformOptions): T;
|
32 | instanceToInstance<T>(object: T[], options?: ClassTransformOptions): T[];
|
33 | |
34 |
|
35 |
|
36 |
|
37 |
|
38 | classToClassFromExist<T>(object: T, fromObject: T, options?: ClassTransformOptions): T;
|
39 | classToClassFromExist<T>(object: T, fromObjects: T[], options?: ClassTransformOptions): T[];
|
40 | |
41 |
|
42 |
|
43 | serialize<T>(object: T, options?: ClassTransformOptions): string;
|
44 | serialize<T>(object: T[], options?: ClassTransformOptions): string;
|
45 | |
46 |
|
47 |
|
48 | deserialize<T>(cls: ClassConstructor<T>, json: string, options?: ClassTransformOptions): T;
|
49 | |
50 |
|
51 |
|
52 | deserializeArray<T>(cls: ClassConstructor<T>, json: string, options?: ClassTransformOptions): T[];
|
53 | }
|