mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-05-13 18:01:19 +00:00
Add doc
This commit is contained in:
parent
17962dee2d
commit
22a0cc27d6
@ -14,8 +14,7 @@ import type { IFluenceClient as IFluenceClient$$, ParticleContext as ParticleCon
|
|||||||
// Making aliases to reduce chance of accidental name collision
|
// Making aliases to reduce chance of accidental name collision
|
||||||
import {
|
import {
|
||||||
v5_callFunction as callFunction$$,
|
v5_callFunction as callFunction$$,
|
||||||
v5_registerService as registerService$$,
|
v5_registerService as registerService$$
|
||||||
FluencePeer as FluencePeer$$
|
|
||||||
} from '@fluencelabs/js-client';
|
} from '@fluencelabs/js-client';
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
// Making aliases to reduce chance of accidental name collision
|
// Making aliases to reduce chance of accidental name collision
|
||||||
import {
|
import {
|
||||||
v5_callFunction as callFunction$$,
|
v5_callFunction as callFunction$$,
|
||||||
v5_registerService as registerService$$,
|
v5_registerService as registerService$$
|
||||||
FluencePeer as FluencePeer$$
|
|
||||||
} from '@fluencelabs/js-client';
|
} from '@fluencelabs/js-client';
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
|
@ -14,8 +14,7 @@ import type { IFluenceClient as IFluenceClient$$, ParticleContext as ParticleCon
|
|||||||
// Making aliases to reduce chance of accidental name collision
|
// Making aliases to reduce chance of accidental name collision
|
||||||
import {
|
import {
|
||||||
v5_callFunction as callFunction$$,
|
v5_callFunction as callFunction$$,
|
||||||
v5_registerService as registerService$$,
|
v5_registerService as registerService$$
|
||||||
FluencePeer as FluencePeer$$
|
|
||||||
} from '@fluencelabs/js-client';
|
} from '@fluencelabs/js-client';
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
|
@ -209,6 +209,7 @@ export const wrapFunction = (
|
|||||||
| ArrowType<LabeledProductType<SimpleTypes> | UnlabeledProductType>,
|
| ArrowType<LabeledProductType<SimpleTypes> | UnlabeledProductType>,
|
||||||
): ServiceImpl[string] => {
|
): ServiceImpl[string] => {
|
||||||
return async (...args) => {
|
return async (...args) => {
|
||||||
|
// These assertions used to correctly destructure tuple. It's impossible to do without asserts due to ts limitations.
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||||
const jsonArgs = args.slice(0, args.length - 1) as JSONValue[];
|
const jsonArgs = args.slice(0, args.length - 1) as JSONValue[];
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user