Comparing version 0.5.27 to 0.5.28
@@ -125,3 +125,25 @@ import { FC } from 'react'; | ||
declare function ready<T = void>(): ReadySignal<T, Ensurable<T>>; | ||
declare namespace ready { | ||
var flag: () => Signal<void, boolean, {}, { | ||
reset(): void; | ||
update: (fn: (state: boolean) => void) => void; | ||
sub: { | ||
<S>(reactionable: Reactionable<S>, fn: (data?: boolean, value?: S, prev?: S) => void): () => void; | ||
once<S_1>(reactionable: Reactionable<S_1>, fn: (data?: boolean, value?: S_1, prev?: S_1) => void): () => void; | ||
}; | ||
set(value: void): void; | ||
}>; | ||
} | ||
declare function ready<T = void>(init: T): ReadySignal<T>; | ||
declare namespace ready { | ||
var flag: () => Signal<void, boolean, {}, { | ||
reset(): void; | ||
update: (fn: (state: boolean) => void) => void; | ||
sub: { | ||
<S>(reactionable: Reactionable<S>, fn: (data?: boolean, value?: S, prev?: S) => void): () => void; | ||
once<S_1>(reactionable: Reactionable<S_1>, fn: (data?: boolean, value?: S_1, prev?: S_1) => void): () => void; | ||
}; | ||
set(value: void): void; | ||
}>; | ||
} | ||
declare function stop_signal(): StopSignal; | ||
@@ -128,0 +150,0 @@ declare function loop(body: () => Promise<any>): () => void; |
@@ -106,6 +106,7 @@ "use strict"; | ||
exports.ready = ready; | ||
ready.flag = () => ready(false).to(true); | ||
function stop_signal() { | ||
is_stop_signal = 1; | ||
try { | ||
const ctx = ready(false).to(true); | ||
const ctx = ready.flag(); | ||
return (ctx.stop = ctx); | ||
@@ -112,0 +113,0 @@ } |
{ | ||
"name": "realar", | ||
"version": "0.5.27", | ||
"version": "0.5.28", | ||
"description": "React state manager", | ||
@@ -88,3 +88,3 @@ "repository": { | ||
}, | ||
"gitHead": "1a1aae16adb62cdcbde87656d896bbc009e1de60" | ||
"gitHead": "b90287c282105069993b0488211f615c0deb13fc" | ||
} |
@@ -281,6 +281,8 @@ import React, { Context, FC } from 'react'; | ||
ready.flag = () => ready(false).to(true); | ||
function stop_signal(): StopSignal { | ||
is_stop_signal = 1; | ||
try { | ||
const ctx = ready(false).to(true) as any; | ||
const ctx = ready.flag() as any; | ||
return (ctx.stop = ctx); | ||
@@ -287,0 +289,0 @@ } finally { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74006
1345