Skip to content

DateMapper

@tsed/json-mapper

Usage

typescript
import { DateMapper } from "@tsed/json-mapper";

See /packages/specs/json-mapper/src/types/components/DateMapper.ts.

Overview

ts
class DateMapper implements JsonMapperMethods {
    deserialize(data: string | number): Date;
    deserialize(data: boolean | null | undefined): boolean | null | undefined;
    serialize(object: Date): any;
}

Description

Mapper for Date type.

deserialize

ts
deserialize(data: string | number): Date;

deserialize

ts
deserialize(data: boolean | null | undefined): boolean | null | undefined;

serialize

ts
serialize(object: Date): any;

Released under the MIT License.