UNPKG

@olakai/sdk

Version:

This document demonstrates how to use the Olakai SDK with all its features.

20 lines 805 B
import { Middleware } from "./index"; /** * Create a logging middleware * This middleware logs the function call and the result. * @param options - The options for the middleware * @default options - { * level: "info", // The level of the log (debug, info, warn, error) * includeArgs: false, // Whether to include the arguments in the log * includeResult: false, // Whether to include the result in the log * logger: console, // The logger to use * } * @returns A middleware function */ export declare function createLoggingMiddleware<TArgs extends any[], TResult>(options: { level?: "debug" | "info" | "warn" | "error"; includeArgs?: boolean; includeResult?: boolean; logger?: Console; }): Middleware<TArgs, TResult>; //# sourceMappingURL=logging.d.ts.map