UNPKG

@btfuse/core

Version:

A native-first framework for building hybdrid web-native applications

23 lines (22 loc) 896 B
import { ISerializable } from "./ISerializable"; import { TSerializable } from "./TSerializable"; /** * A class to serialize several different types of objects into a data structure * that can be reconstructed across the Fuse API bridge. */ export declare class FuseSerializer { constructor(); protected _serializeToString(obj: TSerializable): string; protected _serializePrimitiveToString(obj: number | string | boolean): string; protected _serializeErrorToString(obj: Error): string; protected _serializeDateToString(obj: Date): string; /** * Serializes the given object into a blob. * * @param obj - A supported serializable object. See {@link TSerializable} for * a list of currently supported types * @returns A serialized blob */ serialize(obj: TSerializable): Blob; protected _isISerializable(x: any): x is ISerializable; }