123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import { ClassTransformer } from './ClassTransformer';
- export { ClassTransformer } from './ClassTransformer';
- export * from './decorators';
- export * from './interfaces';
- export * from './enums';
- const classTransformer = new ClassTransformer();
- export function classToPlain(object, options) {
- return classTransformer.instanceToPlain(object, options);
- }
- export function instanceToPlain(object, options) {
- return classTransformer.instanceToPlain(object, options);
- }
- export function classToPlainFromExist(object, plainObject, options) {
- return classTransformer.classToPlainFromExist(object, plainObject, options);
- }
- export function plainToClass(cls, plain, options) {
- return classTransformer.plainToInstance(cls, plain, options);
- }
- export function plainToInstance(cls, plain, options) {
- return classTransformer.plainToInstance(cls, plain, options);
- }
- export function plainToClassFromExist(clsObject, plain, options) {
- return classTransformer.plainToClassFromExist(clsObject, plain, options);
- }
- export function instanceToInstance(object, options) {
- return classTransformer.instanceToInstance(object, options);
- }
- export function classToClassFromExist(object, fromObject, options) {
- return classTransformer.classToClassFromExist(object, fromObject, options);
- }
- export function serialize(object, options) {
- return classTransformer.serialize(object, options);
- }
- export function deserialize(cls, json, options) {
- return classTransformer.deserialize(cls, json, options);
- }
- export function deserializeArray(cls, json, options) {
- return classTransformer.deserializeArray(cls, json, options);
- }
|