UNPKG

@bjesuiter/serializr-helpers

Version:

Provides some helper functions and serialization PropertySchemas for mobxjs/serializr - library

23 lines (22 loc) 860 B
import { JsonType } from "./json-type"; export declare class MomentSerializationOptions { readonly valueIfUndefined: any; constructor(builder: MomentSerializationOptions.Builder); } export declare namespace MomentSerializationOptions { class Builder { valueIfUndefined?: JsonType; constructor(); /** * If the moment value is undefined, which should have been serialized, * this value will be returned. It must be a JSON compatible value. * This means, it must be of one type of: string | boolean | number | object | []. * If this is not set, this moment value will be skipped in serialization. * * Applies only to serialization. * @param value */ useValueIfUndefined(value: JsonType): void; build(): MomentSerializationOptions; } }