@but212/atom-effect 0.26.0 → 0.27.0
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/dist/atom-effect.min.js +1 -1
- package/dist/atom-effect.min.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -11
- package/dist/index.mjs +561 -442
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare function atom<T>(initialValue: T, options?: AtomOptions): Writabl
|
|
|
27
27
|
export declare class AtomError extends Error {
|
|
28
28
|
cause: Error | null;
|
|
29
29
|
recoverable: boolean;
|
|
30
|
+
name: string;
|
|
30
31
|
constructor(message: string, cause?: Error | null, recoverable?: boolean);
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -76,6 +77,7 @@ export declare interface ComputedAtom<T = unknown> extends ReadonlyAtom<T>, Disp
|
|
|
76
77
|
|
|
77
78
|
/** Computed error. */
|
|
78
79
|
export declare class ComputedError extends AtomError {
|
|
80
|
+
name: string;
|
|
79
81
|
constructor(message: string, cause?: Error | null);
|
|
80
82
|
}
|
|
81
83
|
|
|
@@ -104,7 +106,7 @@ export declare const DEBUG_CONFIG: {
|
|
|
104
106
|
};
|
|
105
107
|
|
|
106
108
|
/**
|
|
107
|
-
*
|
|
109
|
+
* Global debug controller singleton.
|
|
108
110
|
*/
|
|
109
111
|
export declare const DEBUG_RUNTIME: DebugConfig;
|
|
110
112
|
|
|
@@ -129,6 +131,8 @@ export declare interface Dependency {
|
|
|
129
131
|
/* Excluded from this release type: version */
|
|
130
132
|
/* Excluded from this release type: flags */
|
|
131
133
|
/* Excluded from this release type: _lastSeenEpoch */
|
|
134
|
+
/* Excluded from this release type: isComputed */
|
|
135
|
+
/* Excluded from this release type: hasError */
|
|
132
136
|
/**
|
|
133
137
|
* Adds a subscriber to this dependency.
|
|
134
138
|
* The listener may optionally receive the new and previous values.
|
|
@@ -157,6 +161,7 @@ export declare function effect(fn: EffectFunction, options?: EffectOptions): Eff
|
|
|
157
161
|
|
|
158
162
|
/** Effect error. */
|
|
159
163
|
export declare class EffectError extends AtomError {
|
|
164
|
+
name: string;
|
|
160
165
|
constructor(message: string, cause?: Error | null);
|
|
161
166
|
}
|
|
162
167
|
|
|
@@ -235,7 +240,7 @@ export declare interface ReadonlyAtom<T = unknown> {
|
|
|
235
240
|
/**
|
|
236
241
|
* Scheduler implementation.
|
|
237
242
|
*/
|
|
238
|
-
declare class
|
|
243
|
+
declare class Scheduler_2 {
|
|
239
244
|
/** Queue buffer */
|
|
240
245
|
_queueBuffer: [SchedulerJob[], SchedulerJob[]];
|
|
241
246
|
_bufferIndex: number;
|
|
@@ -244,7 +249,6 @@ declare class Scheduler {
|
|
|
244
249
|
_epoch: number;
|
|
245
250
|
/** State flags */
|
|
246
251
|
_isProcessing: boolean;
|
|
247
|
-
_isBatching: boolean;
|
|
248
252
|
_isFlushingSync: boolean;
|
|
249
253
|
/** Batching state */
|
|
250
254
|
_batchDepth: number;
|
|
@@ -256,7 +260,6 @@ declare class Scheduler {
|
|
|
256
260
|
onOverflow: ((droppedCount: number) => void) | null;
|
|
257
261
|
/** Bound run loop for microtask */
|
|
258
262
|
private readonly _boundRunLoop;
|
|
259
|
-
get phase(): SchedulerPhase;
|
|
260
263
|
get queueSize(): number;
|
|
261
264
|
get isBatching(): boolean;
|
|
262
265
|
/**
|
|
@@ -281,7 +284,8 @@ declare class Scheduler {
|
|
|
281
284
|
setMaxFlushIterations(max: number): void;
|
|
282
285
|
}
|
|
283
286
|
|
|
284
|
-
|
|
287
|
+
declare const scheduler_2: Scheduler_2;
|
|
288
|
+
export { scheduler_2 as scheduler }
|
|
285
289
|
|
|
286
290
|
/**
|
|
287
291
|
* Scheduler configuration.
|
|
@@ -297,6 +301,7 @@ export declare const SCHEDULER_CONFIG: {
|
|
|
297
301
|
|
|
298
302
|
/** Scheduler error. */
|
|
299
303
|
export declare class SchedulerError extends AtomError {
|
|
304
|
+
name: string;
|
|
300
305
|
constructor(message: string, cause?: Error | null);
|
|
301
306
|
}
|
|
302
307
|
|
|
@@ -314,12 +319,6 @@ declare interface SchedulerJobObject {
|
|
|
314
319
|
_nextEpoch?: number;
|
|
315
320
|
}
|
|
316
321
|
|
|
317
|
-
declare enum SchedulerPhase {
|
|
318
|
-
IDLE = 0,
|
|
319
|
-
BATCHING = 1,
|
|
320
|
-
FLUSHING = 2
|
|
321
|
-
}
|
|
322
|
-
|
|
323
322
|
export declare interface Subscriber {
|
|
324
323
|
execute(): void;
|
|
325
324
|
}
|