@olakai/sdk
Version:
This document demonstrates how to use the Olakai SDK with all its features.
16 lines • 886 B
TypeScript
import { Middleware } from "./index";
/**
* Create a transform middleware
* This middleware transforms the arguments and result of a function call.
* @param options - The options for the middleware
* @param options.transformArgs - The function to transform the arguments
* @param options.transformResult - The function to transform the result
* @returns A middleware function
* Important point: this Middleware is applied after the Control call to OLakai API.
* So this middleware will only modify the way that data is ent to fthe function and to the monitoring part of this API.
*/
export declare function createTransformMiddleware<TArgs extends any[], TResult>(options: {
transformArgs?: (args: TArgs) => TArgs | Promise<TArgs>;
transformResult?: (result: TResult) => TResult | Promise<TResult>;
}): Middleware<TArgs, TResult>;
//# sourceMappingURL=transform.d.ts.map