import { ISerializable } from './ISerializable';
/**
 * Type of supported serializable obejcts that can go over the Fuse API bridge.
 *
 * Currently the supported types are:
 *  - Error
 *  - Blob
 *  - ArrayBuffer
 *  - Primitives (string, number, boolean)
 *  - Date
 *  - Any object or array consisting exclusively of the above types
 */
export type TSerializable = Error | string | Blob | ArrayBuffer | ISerializable<TSerializable> | number | boolean | Date | TSerializable[] | {
    [key: string]: TSerializable;
};
/**
 * Utility type wrap, useful if you have a concrete interface of TSerializable properties.
 * Use this to declare that your interface is Fuse Serializable.
 *
 * e.g.
 *
 * ```typescript
 *  interface MyInterface {...}
 *  type TMyInterface = FuseSerializable<MyInterface>;
 * ```
 *
 */
export type TFuseSerializable<T> = {
    [K in keyof T]: T[K];
};
