parallel-es
Version:
Simple parallelization for EcmaScript
21 lines (20 loc) • 1.09 kB
TypeScript
import { IFunctionLookupTable } from "./function-lookup-table";
import { ISerializedFunctionCall } from "./serialized-function-call";
/**
* Deserializer for a {@link ISerializedFunctionCall}.
*/
export declare class FunctionCallDeserializer {
private functionLookupTable;
/**
* Creates a new deserializer that uses the given function lookup table to retrieve the function for a given id
* @param functionLookupTable the lookup table to use
*/
constructor(functionLookupTable: IFunctionLookupTable);
/**
* Deserializes the function call into a function
* @param functionCall the function call to deserialize
* @param deserializeParams indicator if the parameters passed to the serialized function should be deserailized too
* @returns a function that can be called with additional parameters (the params from the serialized function calls are prepended to the passed parameters)
*/
deserializeFunctionCall<TResult>(functionCall: ISerializedFunctionCall, deserializeParams?: boolean): (...additionalParams: any[]) => TResult;
}