@solidjs/signals 0.9.1 → 0.9.2

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.
@@ -16,6 +16,7 @@ export interface SignalOptions<T> {
16
16
  equals?: ((prev: T, next: T) => boolean) | false;
17
17
  pureWrite?: boolean;
18
18
  unobserved?: () => void;
19
+ lazy?: boolean;
19
20
  }
20
21
  export interface RawSignal<T> {
21
22
  id?: string;
@@ -1,5 +1,6 @@
1
1
  import type { Computed, Signal } from "./core.js";
2
2
  import { type Heap } from "./heap.js";
3
+ export declare let optimisticRun: boolean;
3
4
  export declare const dirtyQueue: Heap;
4
5
  export declare const zombieQueue: Heap;
5
6
  export declare let clock: number;
@@ -13,7 +14,9 @@ export interface Transition {
13
14
  time: number;
14
15
  asyncNodes: Computed<any>[];
15
16
  pendingNodes: Signal<any>[];
17
+ optimisticNodes: Signal<any>[];
16
18
  queueStash: QueueStub;
19
+ done: boolean;
17
20
  }
18
21
  export declare function schedule(): void;
19
22
  export interface IQueue {
@@ -43,12 +46,15 @@ export declare class Queue implements IQueue {
43
46
  export declare class GlobalQueue extends Queue {
44
47
  _running: boolean;
45
48
  _pendingNodes: Signal<any>[];
49
+ _optimisticNodes: Signal<any>[];
46
50
  static _update: (el: Computed<unknown>) => void;
47
51
  static _dispose: (el: Computed<unknown>, self: boolean, zombie: boolean) => void;
48
52
  flush(): void;
49
53
  notify(node: Computed<any>, mask: number, flags: number): boolean;
50
54
  initTransition(node: Computed<any>): void;
51
55
  }
56
+ export declare function notifySubs(node: Signal<any> | Computed<any>): void;
57
+ export declare function runOptimistic(activeTransition?: Transition | null): void;
52
58
  export declare const globalQueue: GlobalQueue;
53
59
  /**
54
60
  * By default, changes are batched on the microtask queue which is an async process. You can flush
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidjs/signals",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",