@synerty/vortexjs
Version:
Custom observable data serialisation and routing based on Angular 2+
37 lines (36 loc) • 1.24 kB
TypeScript
import "./UtilArray";
import { PayloadDelegateABC } from "./payload/PayloadDelegateABC";
import { Jsonable, Tuple } from "./exports";
/**
* IPayloadFilt
* This interface defines the structure for a valid payload filter.
*/
export interface IPayloadFilt {
key: string;
[more: string]: any;
}
/**
*
* This class is serialised and transferred over the vortex to the server.
*/
export declare class Payload extends Jsonable {
private static workerDelegate;
filt: {};
tuples: Array<Tuple | any>;
date: Date | null;
/**
* Payload
* This class is serialised and tranferred over the vortex to the server.
* @param filt The filter that the server handler is listening for
* @param tuples: The tuples to init the Payload with
* different location @depreciated
* @param date The date for this envelope, it should match the payload.
*/
constructor(filt?: {}, tuples?: Array<Tuple | any>, date?: Date | null);
static setWorkerDelegate(delegate: PayloadDelegateABC): void;
private _fromJson;
private _toJson;
static fromEncodedPayload(encodedPayloadStr: string): Promise<Payload>;
toEncodedPayload(): Promise<string>;
makePayloadEnvelope(): Promise<any>;
}