@esportsplus/reactivity 0.1.5 → 0.1.7
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/build/macro.d.ts +5 -6
- package/build/resource.d.ts +6 -7
- package/build/resource.js +3 -3
- package/build/signal.d.ts +8 -10
- package/build/signal.js +7 -6
- package/build/types.d.ts +10 -12
- package/package.json +2 -2
- package/src/macro.ts +7 -8
- package/src/resource.ts +9 -11
- package/src/signal.ts +16 -15
- package/src/types.ts +11 -14
package/build/macro.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import CustomFunction from '@esportsplus/custom-function';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type Fn<A extends unknown[], R> = Computed<(...args: A) => R>['fn'];
|
|
5
|
-
type Options = Parameters<typeof computed>[1];
|
|
2
|
+
import { Computed, NeverAsync, Options } from './types';
|
|
3
|
+
type Function<A extends unknown[], R> = Computed<(...args: A) => R>['fn'];
|
|
6
4
|
declare class Macro<A extends unknown[], R> extends CustomFunction {
|
|
7
5
|
#private;
|
|
8
|
-
constructor(fn:
|
|
6
|
+
constructor(fn: Function<A, R>, options?: Options);
|
|
9
7
|
dispose(): void;
|
|
10
8
|
reset(): void;
|
|
11
9
|
}
|
|
12
|
-
declare const _default: <A extends unknown[], R>(fn: (previous: (...args: A) => R) => (...args: A) => R, options?: Options) => Macro<A, R>;
|
|
10
|
+
declare const _default: <A extends unknown[], R>(fn: (previous: (...args: A) => R) => ((...args: A) => R) extends infer T ? T extends (...args: A) => R ? T extends (...args: unknown[]) => unknown ? NeverAsync<ReturnType<T>> extends never ? never : T : T : never : never, options?: Options) => Macro<A, R>;
|
|
13
11
|
export default _default;
|
|
12
|
+
export { NeverAsync };
|
package/build/resource.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import CustomFunction from '@esportsplus/custom-function';
|
|
2
|
-
import {
|
|
3
|
-
type
|
|
4
|
-
type Options = Parameters<typeof computed>[1];
|
|
2
|
+
import { Options } from './types';
|
|
3
|
+
type Function<A extends unknown[], R extends Promise<unknown>> = (...args: A) => R;
|
|
5
4
|
declare class Resource<A extends unknown[], R extends Promise<unknown>> extends CustomFunction {
|
|
6
5
|
#private;
|
|
7
6
|
stop: boolean | null;
|
|
8
|
-
constructor(fn:
|
|
9
|
-
get data(): Awaited<R
|
|
7
|
+
constructor(fn: Function<A, R>, options?: Options);
|
|
8
|
+
get data(): Awaited<R>;
|
|
9
|
+
get input(): A | null;
|
|
10
10
|
get ok(): boolean | null;
|
|
11
|
-
get input(): A | ReturnType<import("./types").PreventPromise<A, (previous: A | null) => A | null>> | null;
|
|
12
11
|
dispose(): void;
|
|
13
12
|
reset(): void;
|
|
14
13
|
}
|
|
15
|
-
declare const _default: <A extends unknown[], R extends Promise<unknown>>(fn:
|
|
14
|
+
declare const _default: <A extends unknown[], R extends Promise<unknown>>(fn: Function<A, R>, options?: Options) => Resource<A, R>;
|
|
16
15
|
export default _default;
|
package/build/resource.js
CHANGED
|
@@ -33,12 +33,12 @@ class Resource extends CustomFunction {
|
|
|
33
33
|
get data() {
|
|
34
34
|
return read(this.#data);
|
|
35
35
|
}
|
|
36
|
-
get ok() {
|
|
37
|
-
return read(this.#ok);
|
|
38
|
-
}
|
|
39
36
|
get input() {
|
|
40
37
|
return read(this.#input);
|
|
41
38
|
}
|
|
39
|
+
get ok() {
|
|
40
|
+
return read(this.#ok);
|
|
41
|
+
}
|
|
42
42
|
dispose() {
|
|
43
43
|
this.#data.dispose();
|
|
44
44
|
this.#input.dispose();
|
package/build/signal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Changed, Computed, Effect, Event, Listener,
|
|
1
|
+
import { Changed, Computed, Effect, Event, Listener, NeverAsync, Options, Root, Scheduler, State, Type } from './types';
|
|
2
2
|
declare class Signal<T> {
|
|
3
3
|
changed: Changed | null;
|
|
4
|
-
fn: Computed<T>['fn'] | null;
|
|
4
|
+
fn: Computed<T>['fn'] | Effect['fn'] | null;
|
|
5
5
|
listeners: Record<Event, (Listener<any> | null)[]> | null;
|
|
6
6
|
observers: Signal<T>[] | null;
|
|
7
7
|
root: Root | null;
|
|
@@ -10,7 +10,7 @@ declare class Signal<T> {
|
|
|
10
10
|
task: Parameters<Scheduler>[0] | null;
|
|
11
11
|
type: Type;
|
|
12
12
|
updating: boolean | null;
|
|
13
|
-
value:
|
|
13
|
+
value: T;
|
|
14
14
|
constructor(data: T, state: Signal<T>['state'], type: Signal<T>['type'], options?: Options);
|
|
15
15
|
dispatch<D>(event: Event, data?: D): void;
|
|
16
16
|
dispose(): void;
|
|
@@ -18,19 +18,17 @@ declare class Signal<T> {
|
|
|
18
18
|
once(event: Event, listener: Listener<any>): void;
|
|
19
19
|
reset(): void;
|
|
20
20
|
}
|
|
21
|
-
declare const computed: <T>(fn:
|
|
21
|
+
declare const computed: <T>(fn: (previous: T) => NeverAsync<T>, options?: Options) => Computed<T>;
|
|
22
22
|
declare const dispose: <T extends {
|
|
23
23
|
dispose: () => void;
|
|
24
24
|
}>(dispose?: T | T[] | undefined) => T | T[] | undefined;
|
|
25
|
-
declare const effect:
|
|
26
|
-
declare const read: <T>(node: Signal<T>) => T
|
|
25
|
+
declare const effect: (fn: Effect['fn'], options?: Omit<Options, 'value'>) => Effect;
|
|
26
|
+
declare const read: <T>(node: Signal<T>) => T;
|
|
27
27
|
declare const reset: <T extends {
|
|
28
28
|
reset: () => void;
|
|
29
29
|
}>(reset?: T | T[] | undefined) => T | T[] | undefined;
|
|
30
|
-
declare
|
|
31
|
-
scheduler?: Scheduler;
|
|
32
|
-
}) => T;
|
|
30
|
+
declare function root<T>(fn: () => NeverAsync<T>, properties?: Root): NeverAsync<T>;
|
|
33
31
|
declare const signal: <T>(data: T, options?: Omit<Options, 'value'>) => Signal<T>;
|
|
34
|
-
declare const write: <T>(node: Signal<T>, value: unknown) => T
|
|
32
|
+
declare const write: <T>(node: Signal<T>, value: unknown) => T;
|
|
35
33
|
export default Signal;
|
|
36
34
|
export { computed, dispose, effect, read, reset, root, signal, write };
|
package/build/signal.js
CHANGED
|
@@ -216,11 +216,11 @@ const dispose = (dispose) => {
|
|
|
216
216
|
return dispose;
|
|
217
217
|
};
|
|
218
218
|
const effect = (fn, options = {}) => {
|
|
219
|
-
let node = new Signal(
|
|
219
|
+
let node = new Signal(void 0, DIRTY, EFFECT, options);
|
|
220
220
|
if (scope !== null) {
|
|
221
221
|
node.root = scope;
|
|
222
222
|
}
|
|
223
|
-
else if (observer !== null && observer.type === EFFECT) {
|
|
223
|
+
else if (observer !== null && observer.type === EFFECT && observer.root !== null) {
|
|
224
224
|
node.root = observer.root;
|
|
225
225
|
}
|
|
226
226
|
else {
|
|
@@ -266,13 +266,13 @@ const reset = (reset) => {
|
|
|
266
266
|
}
|
|
267
267
|
return reset;
|
|
268
268
|
};
|
|
269
|
-
|
|
269
|
+
function root(fn, properties) {
|
|
270
270
|
let o = observer, s = scope;
|
|
271
|
-
if (properties
|
|
271
|
+
if (properties === undefined) {
|
|
272
272
|
if (scope === null) {
|
|
273
273
|
throw new Error('Reactivity: `root` cannot be created without a task scheduler');
|
|
274
274
|
}
|
|
275
|
-
properties
|
|
275
|
+
properties = scope;
|
|
276
276
|
}
|
|
277
277
|
observer = null;
|
|
278
278
|
scope = properties;
|
|
@@ -280,7 +280,8 @@ const root = (fn, properties = {}) => {
|
|
|
280
280
|
observer = o;
|
|
281
281
|
scope = s;
|
|
282
282
|
return result;
|
|
283
|
-
}
|
|
283
|
+
}
|
|
284
|
+
;
|
|
284
285
|
const signal = (data, options = {}) => {
|
|
285
286
|
return new Signal(data, CLEAN, SIGNAL, options);
|
|
286
287
|
};
|
package/build/types.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { Prettify } from '@esportsplus/typescript';
|
|
1
|
+
import { Function, NeverAsync, Prettify } from '@esportsplus/typescript';
|
|
2
2
|
import { CHECK, CLEAN, COMPUTED, DIRTY, DISPOSED, EFFECT, SIGNAL } from './constants';
|
|
3
3
|
import Signal from './signal';
|
|
4
4
|
type Changed = (a: unknown, b: unknown) => boolean;
|
|
5
5
|
type Computed<T> = {
|
|
6
|
-
fn:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
task: NonNullable<Signal<T>['task']>;
|
|
6
|
+
fn: (previous: T) => NeverAsync<T>;
|
|
7
|
+
} & Omit<Signal<T>, 'fn'>;
|
|
8
|
+
type Effect = {
|
|
9
|
+
fn: (node: Effect) => NeverAsync<void>;
|
|
10
|
+
root: Root;
|
|
11
|
+
task: Function;
|
|
13
12
|
value: void;
|
|
14
|
-
} & Omit<Signal<
|
|
13
|
+
} & Omit<Signal<void>, 'fn' | 'root' | 'task' | 'value'>;
|
|
15
14
|
type Event = string;
|
|
16
15
|
type Listener<D> = {
|
|
17
16
|
once?: boolean;
|
|
@@ -25,11 +24,10 @@ type Options = {
|
|
|
25
24
|
changed?: Changed;
|
|
26
25
|
value?: unknown;
|
|
27
26
|
};
|
|
28
|
-
type PreventPromise<T, R> = T extends Promise<unknown> ? never : R;
|
|
29
27
|
type Root = {
|
|
30
28
|
scheduler: Scheduler;
|
|
31
29
|
};
|
|
32
|
-
type Scheduler = (fn:
|
|
30
|
+
type Scheduler = (fn: Function) => unknown;
|
|
33
31
|
type State = typeof CHECK | typeof CLEAN | typeof DIRTY | typeof DISPOSED;
|
|
34
32
|
type Type = typeof COMPUTED | typeof EFFECT | typeof SIGNAL;
|
|
35
|
-
export { Changed, Computed, Effect, Event, Listener, Object, Options,
|
|
33
|
+
export { Changed, Computed, Effect, Event, Listener, Object, Options, NeverAsync, Prettify, Root, Scheduler, Signal, State, Type };
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"@esportsplus/custom-function": "^0.0.1"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@esportsplus/typescript": "^0.0.
|
|
7
|
+
"@esportsplus/typescript": "^0.0.7"
|
|
8
8
|
},
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"name": "@esportsplus/reactivity",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"prepublishOnly": "npm run build"
|
|
17
17
|
},
|
|
18
18
|
"types": "build/index.d.ts",
|
|
19
|
-
"version": "0.1.
|
|
19
|
+
"version": "0.1.7"
|
|
20
20
|
}
|
package/src/macro.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import CustomFunction from '@esportsplus/custom-function';
|
|
2
2
|
import { computed, read } from './signal';
|
|
3
|
-
import { Computed } from './types';
|
|
3
|
+
import { Computed, NeverAsync, Options } from './types';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
type Options = Parameters<typeof computed>[1];
|
|
6
|
+
type Function<A extends unknown[], R> = Computed<(...args: A) => R>['fn'];
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
class Macro<A extends unknown[], R> extends CustomFunction {
|
|
12
|
-
#factory: Computed<
|
|
10
|
+
#factory: Computed<(...args: A) => R>;
|
|
13
11
|
|
|
14
12
|
|
|
15
|
-
constructor(fn:
|
|
13
|
+
constructor(fn: Function<A,R>, options: Options = {}) {
|
|
16
14
|
super((...args: A) => {
|
|
17
15
|
return read(this.#factory)(...args);
|
|
18
16
|
});
|
|
@@ -30,6 +28,7 @@ class Macro<A extends unknown[], R> extends CustomFunction {
|
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
|
|
33
|
-
export default <A extends unknown[], R>(fn:
|
|
31
|
+
export default <A extends unknown[], R>(fn: Function<A,R>, options: Options = {}) => {
|
|
34
32
|
return new Macro(fn, options);
|
|
35
|
-
};
|
|
33
|
+
};
|
|
34
|
+
export { NeverAsync };
|
package/src/resource.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import CustomFunction from '@esportsplus/custom-function';
|
|
2
|
-
import {
|
|
3
|
-
import { Signal } from './types';
|
|
2
|
+
import { read, signal, write } from './signal';
|
|
3
|
+
import { Options, Signal } from './types';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
type Options = Parameters<typeof computed>[1];
|
|
6
|
+
type Function<A extends unknown[], R extends Promise<unknown>> = (...args: A) => R;
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
class Resource<A extends unknown[], R extends Promise<unknown>> extends CustomFunction {
|
|
@@ -16,7 +14,7 @@ class Resource<A extends unknown[], R extends Promise<unknown>> extends CustomFu
|
|
|
16
14
|
stop: boolean | null = null;
|
|
17
15
|
|
|
18
16
|
|
|
19
|
-
constructor(fn:
|
|
17
|
+
constructor(fn: Function<A,R>, options: Options = {}) {
|
|
20
18
|
super((...args: A) => {
|
|
21
19
|
this.stop = null;
|
|
22
20
|
|
|
@@ -51,14 +49,14 @@ class Resource<A extends unknown[], R extends Promise<unknown>> extends CustomFu
|
|
|
51
49
|
return read(this.#data);
|
|
52
50
|
}
|
|
53
51
|
|
|
54
|
-
get ok() {
|
|
55
|
-
return read(this.#ok);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
52
|
get input() {
|
|
59
53
|
return read(this.#input);
|
|
60
54
|
}
|
|
61
55
|
|
|
56
|
+
get ok() {
|
|
57
|
+
return read(this.#ok);
|
|
58
|
+
}
|
|
59
|
+
|
|
62
60
|
|
|
63
61
|
dispose() {
|
|
64
62
|
this.#data.dispose();
|
|
@@ -74,6 +72,6 @@ class Resource<A extends unknown[], R extends Promise<unknown>> extends CustomFu
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
|
|
77
|
-
export default <A extends unknown[], R extends Promise<unknown>>(fn:
|
|
75
|
+
export default <A extends unknown[], R extends Promise<unknown>>(fn: Function<A,R>, options: Options = {}) => {
|
|
78
76
|
return new Resource(fn, options);
|
|
79
77
|
};
|
package/src/signal.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CHECK, CLEAN, COMPUTED, DIRTY, DISPOSED, EFFECT, SIGNAL } from './constants';
|
|
2
|
-
import { Changed, Computed, Effect, Event, Listener,
|
|
2
|
+
import { Changed, Computed, Effect, Event, Listener, NeverAsync, Options, Root, Scheduler, State, Type } from './types';
|
|
3
3
|
import { isArray } from './utilities';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
let index = 0,
|
|
8
7
|
observer: Signal<any> | null = null,
|
|
9
8
|
observers: Signal<any>[] | null = null,
|
|
@@ -12,7 +11,7 @@ let index = 0,
|
|
|
12
11
|
|
|
13
12
|
class Signal<T> {
|
|
14
13
|
changed: Changed | null = null;
|
|
15
|
-
fn: Computed<T>['fn'] | null = null;
|
|
14
|
+
fn: Computed<T>['fn'] | Effect['fn'] | null = null;
|
|
16
15
|
listeners: Record<Event, (Listener<any> | null)[]> | null = null;
|
|
17
16
|
observers: Signal<T>[] | null = null;
|
|
18
17
|
root: Root | null = null;
|
|
@@ -21,7 +20,7 @@ class Signal<T> {
|
|
|
21
20
|
task: Parameters<Scheduler>[0] | null = null;
|
|
22
21
|
type: Type;
|
|
23
22
|
updating: boolean | null = null;
|
|
24
|
-
value:
|
|
23
|
+
value: T;
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
constructor(data: T, state: Signal<T>['state'], type: Signal<T>['type'], options: Options = {}) {
|
|
@@ -209,7 +208,9 @@ function update<T>(node: Signal<T>) {
|
|
|
209
208
|
node.dispatch('update');
|
|
210
209
|
node.updating = true;
|
|
211
210
|
|
|
212
|
-
let value =
|
|
211
|
+
let value = (
|
|
212
|
+
node as typeof node extends Effect ? Effect : Computed<T>
|
|
213
|
+
).fn.call(node, node.value);
|
|
213
214
|
|
|
214
215
|
node.updating = null;
|
|
215
216
|
|
|
@@ -263,11 +264,11 @@ function update<T>(node: Signal<T>) {
|
|
|
263
264
|
|
|
264
265
|
|
|
265
266
|
const computed = <T>(fn: Computed<T>['fn'], options: Options = {}) => {
|
|
266
|
-
let node = new Signal(options.value as
|
|
267
|
+
let node = new Signal(options.value as T, DIRTY, COMPUTED, options) as Computed<T>;
|
|
267
268
|
|
|
268
269
|
node.fn = fn;
|
|
269
270
|
|
|
270
|
-
return node
|
|
271
|
+
return node;
|
|
271
272
|
};
|
|
272
273
|
|
|
273
274
|
const dispose = <T extends { dispose: () => void }>(dispose?: T[] | T) => {
|
|
@@ -285,13 +286,13 @@ const dispose = <T extends { dispose: () => void }>(dispose?: T[] | T) => {
|
|
|
285
286
|
return dispose;
|
|
286
287
|
};
|
|
287
288
|
|
|
288
|
-
const effect =
|
|
289
|
-
let node = new Signal(
|
|
289
|
+
const effect = (fn: Effect['fn'], options: Omit<Options, 'value'> = {}) => {
|
|
290
|
+
let node = new Signal(void 0, DIRTY, EFFECT, options) as Effect;
|
|
290
291
|
|
|
291
292
|
if (scope !== null) {
|
|
292
293
|
node.root = scope;
|
|
293
294
|
}
|
|
294
|
-
else if (observer !== null && observer.type === EFFECT) {
|
|
295
|
+
else if (observer !== null && observer.type === EFFECT && observer.root !== null) {
|
|
295
296
|
node.root = observer.root;
|
|
296
297
|
}
|
|
297
298
|
else {
|
|
@@ -303,7 +304,7 @@ const effect = <T>(fn: Effect<T>['fn'], options: Omit<Options, 'value'> = {}) =>
|
|
|
303
304
|
|
|
304
305
|
read(node);
|
|
305
306
|
|
|
306
|
-
return node
|
|
307
|
+
return node;
|
|
307
308
|
};
|
|
308
309
|
|
|
309
310
|
const read = <T>(node: Signal<T>): typeof node['value'] => {
|
|
@@ -347,20 +348,20 @@ const reset = <T extends { reset: () => void }>(reset?: T[] | T) => {
|
|
|
347
348
|
return reset;
|
|
348
349
|
};
|
|
349
350
|
|
|
350
|
-
|
|
351
|
+
function root<T>(fn: () => NeverAsync<T>, properties?: Root) {
|
|
351
352
|
let o = observer,
|
|
352
353
|
s = scope;
|
|
353
354
|
|
|
354
|
-
if (properties
|
|
355
|
+
if (properties === undefined) {
|
|
355
356
|
if (scope === null) {
|
|
356
357
|
throw new Error('Reactivity: `root` cannot be created without a task scheduler');
|
|
357
358
|
}
|
|
358
359
|
|
|
359
|
-
properties
|
|
360
|
+
properties = scope;
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
observer = null;
|
|
363
|
-
scope = properties
|
|
364
|
+
scope = properties;
|
|
364
365
|
|
|
365
366
|
let result = fn();
|
|
366
367
|
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Prettify } from '@esportsplus/typescript'
|
|
1
|
+
import { Function, NeverAsync, Prettify } from '@esportsplus/typescript'
|
|
2
2
|
import { CHECK, CLEAN, COMPUTED, DIRTY, DISPOSED, EFFECT, SIGNAL } from './constants';
|
|
3
3
|
import Signal from './signal';
|
|
4
4
|
|
|
@@ -6,16 +6,15 @@ import Signal from './signal';
|
|
|
6
6
|
type Changed = (a: unknown, b: unknown) => boolean;
|
|
7
7
|
|
|
8
8
|
type Computed<T> = {
|
|
9
|
-
fn:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
task: NonNullable<Signal<T>['task']>
|
|
9
|
+
fn: (previous: T) => NeverAsync<T>;
|
|
10
|
+
} & Omit<Signal<T>, 'fn'>;
|
|
11
|
+
|
|
12
|
+
type Effect = {
|
|
13
|
+
fn: (node: Effect) => NeverAsync<void>;
|
|
14
|
+
root: Root;
|
|
15
|
+
task: Function
|
|
17
16
|
value: void;
|
|
18
|
-
} & Omit<Signal<
|
|
17
|
+
} & Omit<Signal<void>, 'fn' | 'root' | 'task' | 'value'>;
|
|
19
18
|
|
|
20
19
|
type Event = string;
|
|
21
20
|
|
|
@@ -32,17 +31,15 @@ type Options = {
|
|
|
32
31
|
value?: unknown;
|
|
33
32
|
};
|
|
34
33
|
|
|
35
|
-
type PreventPromise<T, R> = T extends Promise<unknown> ? never : R;
|
|
36
|
-
|
|
37
34
|
type Root = {
|
|
38
35
|
scheduler: Scheduler
|
|
39
36
|
};
|
|
40
37
|
|
|
41
|
-
type Scheduler = (fn:
|
|
38
|
+
type Scheduler = (fn: Function) => unknown;
|
|
42
39
|
|
|
43
40
|
type State = typeof CHECK | typeof CLEAN | typeof DIRTY | typeof DISPOSED;
|
|
44
41
|
|
|
45
42
|
type Type = typeof COMPUTED | typeof EFFECT | typeof SIGNAL;
|
|
46
43
|
|
|
47
44
|
|
|
48
|
-
export { Changed, Computed, Effect, Event, Listener, Object, Options,
|
|
45
|
+
export { Changed, Computed, Effect, Event, Listener, Object, Options, NeverAsync, Prettify, Root, Scheduler, Signal, State, Type };
|