Skip to main content
Version: Annotations-V1.0.0

DateSerializer

@frost/frost-web / Exports / DateSerializer

Function: DateSerializer

DateSerializer<T>(): PropertyDecorator

This a default Date Serialize Decorator that will use the native JS Date Class to serialize and deserialize the dates

use this to serialize the dates by default

Decorator

Example

@FrostEntity(...)
class A extends FrostObject {
@DateSerializer()
createdAt?: Date;
}

Type parameters

Name
T

Returns

PropertyDecorator