@versatiledatakit/shared
Version:
Versatile Data Kit Shared library enables reusability of shared features like: NgRx Redux, Error Handlers, Utils, Generic Components, etc.
20 lines (19 loc) • 734 B
TypeScript
import { PrimitivesNil, PrimitivesNilArrays, PrimitivesNilObject } from '../../utils';
declare type SerializedType = PrimitivesNil | PrimitivesNilArrays | PrimitivesNilObject | unknown;
/**
* ** This interface gives boundaries for Class instances to get converted into Literals.
*/
export interface Literal<T extends SerializedType = SerializedType> {
/**
* ** Implements this method and return data you want to be serialized into Literals.
*/
toLiteral(): T;
/**
* ** Implements this method and return data you want to be serialized into Literals.
* <p>
* - Data should be deep clone before return, to comply with immutability.
* </p>
*/
toLiteralCloneDeep(): T;
}
export {};