mol_dump_lib 0.0.102 → 0.0.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node.d.ts +14 -2
- package/node.deps.json +1 -1
- package/node.js.map +1 -1
- package/node.test.js +28 -0
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +14 -2
- package/web.deps.json +1 -1
- package/web.js.map +1 -1
- package/web.test.js +28 -0
- package/web.test.js.map +1 -1
package/node.d.ts
CHANGED
|
@@ -572,7 +572,13 @@ declare namespace $ {
|
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
declare namespace $ {
|
|
575
|
-
function $mol_wire_async<Host extends object>(obj: Host):
|
|
575
|
+
export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
|
|
576
|
+
type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
|
|
577
|
+
type MethodsResultPromisify<Host extends Object> = {
|
|
578
|
+
[K in keyof Host]: FunctionResultPromisify<Host[K]>;
|
|
579
|
+
};
|
|
580
|
+
type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
|
|
581
|
+
export {};
|
|
576
582
|
}
|
|
577
583
|
|
|
578
584
|
declare namespace $ {
|
|
@@ -1946,7 +1952,13 @@ declare namespace $ {
|
|
|
1946
1952
|
}
|
|
1947
1953
|
|
|
1948
1954
|
declare namespace $ {
|
|
1949
|
-
function $mol_wire_sync<Host extends object>(obj: Host):
|
|
1955
|
+
export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
|
|
1956
|
+
type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
|
|
1957
|
+
type MethodsResultAwaited<Host extends Object> = {
|
|
1958
|
+
[K in keyof Host]: FunctionResultAwaited<Host[K]>;
|
|
1959
|
+
};
|
|
1960
|
+
type ObjectOrFunctionResultAwaited<Some> = (Some extends (...args: any) => unknown ? FunctionResultAwaited<Some> : {}) & (Some extends Object ? MethodsResultAwaited<Some> : Some);
|
|
1961
|
+
export {};
|
|
1950
1962
|
}
|
|
1951
1963
|
|
|
1952
1964
|
declare namespace $.$$ {
|