Skip to content

Commit

Permalink
Deploying to gh-pages from @ b9e61e4 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelZubkov committed Oct 5, 2023
1 parent 08fb8ed commit 1b48c10
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 10 deletions.
16 changes: 14 additions & 2 deletions node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,13 @@ declare namespace $ {
}

declare namespace $ {
function $mol_wire_async<Host extends object>(obj: Host): (Host extends (...args: infer Args) => infer Res ? Res extends Promise<any> ? Host : (...args: Args) => Promise<Res> : {}) & { [key in keyof Host]: Host[key] extends (...args: infer Args_1) => infer Res_1 ? Res_1 extends Promise<any> ? Host[key] : (...args: Args_1) => Promise<Res_1> : Host[key]; };
export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
type MethodsResultPromisify<Host extends Object> = {
[K in keyof Host]: FunctionResultPromisify<Host[K]>;
};
type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
export {};
}

declare namespace $ {
Expand Down Expand Up @@ -1406,7 +1412,13 @@ declare namespace $ {
}

declare namespace $ {
function $mol_wire_sync<Host extends object>(obj: Host): (Host extends (...args: infer Args) => infer Res ? Res extends Promise<infer Res2> ? (...args: Args) => Res2 : Host : {}) & { [key in keyof Host]: Host[key] extends (...args: infer Args_1) => Promise<infer Res_1> ? (...args: Args_1) => Res_1 : Host[key]; };
export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
type MethodsResultAwaited<Host extends Object> = {
[K in keyof Host]: FunctionResultAwaited<Host[K]>;
};
type ObjectOrFunctionResultAwaited<Some> = (Some extends (...args: any) => unknown ? FunctionResultAwaited<Some> : {}) & (Some extends Object ? MethodsResultAwaited<Some> : Some);
export {};
}

declare namespace $ {
Expand Down
2 changes: 1 addition & 1 deletion node.deps.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion node.js.map

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions node.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13531,6 +13531,24 @@ var $;
;
"use strict";
var $;
(function ($_1) {
$mol_test({
'test types'($) {
class A {
static a() {
return Promise.resolve('');
}
static b() {
return $mol_wire_sync(this).a();
}
}
},
});
})($ || ($ = {}));
//mol/wire/sync/sync.test.ts
;
"use strict";
var $;
(function ($) {
function $mol_wait_timeout_async(timeout) {
const promise = $mol_promise();
Expand All @@ -13551,6 +13569,16 @@ var $;
var $;
(function ($_1) {
$mol_test({
'test types'($) {
class A {
static a() {
return '';
}
static b() {
return $mol_wire_async(this).a();
}
}
},
async 'Latest method calls wins'($) {
class NameLogger extends $mol_object2 {
static $ = $;
Expand Down
2 changes: 1 addition & 1 deletion node.test.js.map

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions web.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,13 @@ declare namespace $ {
}

declare namespace $ {
function $mol_wire_async<Host extends object>(obj: Host): (Host extends (...args: infer Args) => infer Res ? Res extends Promise<any> ? Host : (...args: Args) => Promise<Res> : {}) & { [key in keyof Host]: Host[key] extends (...args: infer Args_1) => infer Res_1 ? Res_1 extends Promise<any> ? Host[key] : (...args: Args_1) => Promise<Res_1> : Host[key]; };
export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
type MethodsResultPromisify<Host extends Object> = {
[K in keyof Host]: FunctionResultPromisify<Host[K]>;
};
type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
export {};
}

declare namespace $ {
Expand Down Expand Up @@ -1262,7 +1268,13 @@ declare namespace $ {
}

declare namespace $ {
function $mol_wire_sync<Host extends object>(obj: Host): (Host extends (...args: infer Args) => infer Res ? Res extends Promise<infer Res2> ? (...args: Args) => Res2 : Host : {}) & { [key in keyof Host]: Host[key] extends (...args: infer Args_1) => Promise<infer Res_1> ? (...args: Args_1) => Res_1 : Host[key]; };
export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
type MethodsResultAwaited<Host extends Object> = {
[K in keyof Host]: FunctionResultAwaited<Host[K]>;
};
type ObjectOrFunctionResultAwaited<Some> = (Some extends (...args: any) => unknown ? FunctionResultAwaited<Some> : {}) & (Some extends Object ? MethodsResultAwaited<Some> : Some);
export {};
}

declare namespace $ {
Expand Down
2 changes: 1 addition & 1 deletion web.deps.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web.js.map

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions web.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web.test.js.map

Large diffs are not rendered by default.

0 comments on commit 1b48c10

Please sign in to comment.