mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-24 21:31:32 +00:00
Fix comments
This commit is contained in:
@ -27,7 +27,6 @@ import {
|
||||
aqua2ts,
|
||||
ts2aqua,
|
||||
wrapFunction,
|
||||
wrapServiceFunction,
|
||||
} from "./compilerSupport/conversions.js";
|
||||
import { ServiceImpl } from "./compilerSupport/types.js";
|
||||
import { FluencePeer } from "./jsPeer/FluencePeer.js";
|
||||
@ -43,7 +42,7 @@ import { callAquaFunction, Fluence, registerService } from "./index.js";
|
||||
* @param script - air script with function execution logic generated by the Aqua compiler
|
||||
*/
|
||||
export const v5_callFunction = async (
|
||||
args: (JSONValue | ((...args: JSONValue[]) => JSONValue))[],
|
||||
args: (JSONValue | ServiceImpl[string])[],
|
||||
def: FunctionCallDef,
|
||||
script: string,
|
||||
): Promise<unknown> => {
|
||||
@ -75,9 +74,7 @@ export const v5_callFunction = async (
|
||||
);
|
||||
}
|
||||
|
||||
const callArgs = Object.fromEntries<
|
||||
JSONValue | ((...args: JSONValue[]) => JSONValue)
|
||||
>(
|
||||
const callArgs = Object.fromEntries<JSONValue | ServiceImpl[string]>(
|
||||
args.slice(0, argCount).map((arg, i) => {
|
||||
const argSchema = functionArgs[argNames[i]];
|
||||
|
||||
@ -160,7 +157,7 @@ export const v5_registerService = (args: unknown[], def: ServiceDef): void => {
|
||||
|
||||
const wrappedServiceImpl = Object.fromEntries(
|
||||
Object.entries(serviceImpl).map(([name, func]) => {
|
||||
return [name, wrapServiceFunction(func, serviceSchema[name])];
|
||||
return [name, wrapFunction(func, serviceSchema[name])];
|
||||
}),
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user