UNPKG

@speckle/objectsender

Version:

Simple API helper to serialize and send objects to the server.

21 lines (20 loc) 707 B
import { ITransport } from '../transports/ITransport'; import { Base } from './Base'; import { IDisposable } from './IDisposable'; export declare class Serializer implements IDisposable { #private; chunkSize: number; detachLineage: boolean[]; lineage: string[]; familyTree: Record<string, Record<string, number>>; closureTable: Record<string, unknown>; transport: ITransport | null; uniqueId: number; hashingFunction: (s: string) => string; constructor(transport: ITransport, chunkSize?: number, hashingFunction?: (s: string) => string); write(obj: Base): Promise<{ hash: string; traversed: Record<string, unknown>; }>; dispose(): void; }