@versatiledatakit/shared
Version:
Versatile Data Kit Shared library enables reusability of shared features like: NgRx Redux, Error Handlers, Utils, Generic Components, etc.
13 lines (12 loc) • 520 B
TypeScript
import { PrimitivesNil, PrimitivesNilArrays, PrimitivesNilObject } from '../../utils';
declare type SerializedType = PrimitivesNil | PrimitivesNilArrays | PrimitivesNilObject | unknown;
/**
* ** This interface gives boundaries for Objects that we want to be serializable for JSON.
*/
export interface Serializable<T extends SerializedType = SerializedType> {
/**
* ** Implements this method and return data you want to be serialized when JSON.stringify(...) is executed.
*/
toJSON(): T;
}
export {};