moleculer-api
Version:
A dynamic API Gateway for MoleculerJS which updates REST endpoints and aggregated GraphQL schema, access control policy for each action calls from metadata of remote services schema without restart or deployment.
18 lines (17 loc) • 639 B
TypeScript
import { RecursivePartial } from "../interface";
import { Reporter } from "./reporter";
export declare type InlineFunctionProps<Args, Return> = {
function: string;
mappableKeys: Extract<keyof Args, string>[];
reporter: Reporter;
returnTypeCheck?: (value: Return) => boolean;
returnTypeNotation?: string;
};
export declare type InlineFunctionOptions = {
util: {
[key: string]: any;
};
};
export declare function createInlineFunction<Args extends {
[key: string]: any;
}, Return = any>(props: InlineFunctionProps<Args, Return>, opts?: RecursivePartial<InlineFunctionOptions>): (args: Args) => Return;