Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit c3eba6a

Browse files
author
Akim Mamedov
committed
Fix types
1 parent 5b3fe66 commit c3eba6a

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

packages/core/interfaces/src/compilerSupport/aquaTypeDefinitions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ export interface ServiceDef {
264264
* List of functions which the service consists of
265265
*/
266266
functions:
267-
| LabeledProductType<ArrowType<LabeledProductType<SimpleTypes>>>
267+
| LabeledProductType<
268+
ArrowType<LabeledProductType<SimpleTypes> | UnlabeledProductType>
269+
>
268270
| NilType;
269271
}

packages/core/js-client/src/compilerSupport/conversions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
NonArrowSimpleType,
2323
ScalarType,
2424
SimpleTypes,
25+
UnlabeledProductType,
2526
} from "@fluencelabs/interfaces";
2627

2728
import { ParticleContext } from "../jsServiceHost/interfaces.js";
@@ -203,7 +204,9 @@ export function js2aqua(
203204

204205
export const wrapFunction = (
205206
func: ServiceImpl[string],
206-
schema: ArrowWithoutCallbacks | ArrowType<LabeledProductType<SimpleTypes>>,
207+
schema:
208+
| ArrowWithoutCallbacks
209+
| ArrowType<LabeledProductType<SimpleTypes> | UnlabeledProductType>,
207210
): ServiceImpl[string] => {
208211
return async (...args) => {
209212
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions

packages/core/js-client/src/jsPeer/FluencePeer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ export abstract class FluencePeer {
548548
) == null
549549
) {
550550
// try to finish script if fire-and-forget enabled
551-
item.onSuccess({});
551+
item.onSuccess(null);
552552
}
553553
})
554554
.catch((e: unknown) => {
@@ -638,7 +638,9 @@ export abstract class FluencePeer {
638638
) == null
639639
) {
640640
// try to finish script if fire-and-forget enabled
641-
item.onSuccess({});
641+
setTimeout(() => {
642+
item.onSuccess(null);
643+
}, 0);
642644
}
643645
}
644646

0 commit comments

Comments
 (0)