@solidjs/signals 0.2.2 → 0.2.4

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.
@@ -162,5 +162,9 @@ export declare function runWithObserver<T>(observer: Computation, run: () => T):
162
162
  */
163
163
  export declare function compute<T>(owner: Owner | null, fn: (val: T) => T, observer: Computation<T>): T;
164
164
  export declare function compute<T>(owner: Owner | null, fn: (val: undefined) => T, observer: null): T;
165
+ export declare function flatten(children: any, options?: {
166
+ skipNonRendered?: boolean;
167
+ doNotUnwrap?: boolean;
168
+ }): any;
165
169
  export declare function createBoundary<T>(fn: () => T, queue: IQueue): T;
166
170
  export {};
@@ -1,9 +1,8 @@
1
1
  export { ContextNotFoundError, NoOwnerError, NotReadyError, type ErrorHandler } from "./error.js";
2
2
  export { Owner, createContext, getContext, setContext, hasContext, getOwner, onCleanup, type Context, type ContextRecord, type Disposable } from "./owner.js";
3
- export { Computation, createBoundary, getObserver, isEqual, untrack, hasUpdated, isPending, latest, catchError, UNCHANGED, compute, runWithObserver, type SignalOptions } from "./core.js";
3
+ export { Computation, createBoundary, getObserver, isEqual, untrack, hasUpdated, isPending, latest, flatten, catchError, UNCHANGED, compute, runWithObserver, type SignalOptions } from "./core.js";
4
4
  export { Effect, EagerComputation } from "./effect.js";
5
5
  export { flushSync, getClock, incrementClock, type IQueue, Queue } from "./scheduler.js";
6
6
  export { createSuspense } from "./suspense.js";
7
7
  export { SUPPORTS_PROXY } from "./constants.js";
8
8
  export * from "./flags.js";
9
- export { flatten } from "./utils.js";
@@ -1,5 +1 @@
1
1
  export declare function isUndefined(value: any): value is undefined;
2
- export declare function flatten(children: any, options?: {
3
- skipNonRendered?: boolean;
4
- doNotUnwrap?: boolean;
5
- }): any;
@@ -17,5 +17,6 @@ export declare function mapArray<Item, MappedItem>(list: Accessor<Maybe<readonly
17
17
  * @description https://docs.solidjs.com/reference/reactive-utilities/repeat
18
18
  */
19
19
  export declare function repeat(count: Accessor<number>, map: (index: number) => any, options?: {
20
+ from?: Accessor<number | undefined>;
20
21
  fallback?: Accessor<any>;
21
22
  }): Accessor<any[]>;
@@ -1,6 +1,6 @@
1
1
  export type { Store, StoreSetter, StoreNode, NotWrappable, SolidStore } from "./store.js";
2
- export type { Merge, Omit } from "./utilities.js";
2
+ export type { Merge, Omit } from "./utils.js";
3
3
  export { unwrap, isWrappable, createStore, $RAW, $TRACK, $PROXY, $TARGET } from "./store.js";
4
4
  export { createProjection } from "./projection.js";
5
5
  export { reconcile } from "./reconcile.js";
6
- export { merge, omit } from "./utilities.js";
6
+ export { merge, omit } from "./utils.js";
@@ -1,6 +1,8 @@
1
+ import { type Store, type StoreSetter } from "./store.js";
1
2
  /**
2
3
  * Creates a mutable derived value
3
4
  *
4
5
  * @see {@link https://github.com/solidjs/x-reactivity#createprojection}
5
6
  */
6
- export declare function createProjection<T extends Object>(fn: (draft: T) => void, initialValue?: T): any;
7
+ export declare function createProjection<T extends Object>(fn: (draft: T) => void, initialValue?: T): Store<T>;
8
+ export declare function wrapProjection<T>(fn: (draft: T) => void, store: Store<T>, setStore: StoreSetter<T>): [Store<T>, StoreSetter<T>];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidjs/signals",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
File without changes