Skip to content

Commit c1b1921

Browse files
author
David Bieregger
committed
Update import and function parameters in persisted.ts
Added 'Accessor' to the imported types from 'solid-js' and altered the function parameters of 'makePersisted' functions. The 'PersistenceOptions' now include an empty object in their type definitions.
1 parent 63b44b5 commit c1b1921

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/storage/src/persisted.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {Setter, Signal} from "solid-js";
1+
import type {Accessor, Setter, Signal} from "solid-js";
22
import {createUniqueId, untrack} from "solid-js";
33
import type {SetStoreFunction, Store} from "solid-js/store";
44
import {reconcile} from "solid-js/store";
@@ -40,7 +40,7 @@ export type PersistenceOptions<T, O extends Record<string, any>> =
4040
*/
4141
export function makePersisted<T>(
4242
signal: [Accessor<T>, Setter<T>],
43-
options?: PersistenceOptions<T>,
43+
options?: PersistenceOptions<T,{}>,
4444
): [Accessor<T>, Setter<T>];
4545

4646

@@ -91,7 +91,7 @@ export function makePersisted<T, O extends Record<string, any>>(
9191
*/
9292
export function makePersisted<T>(
9393
signal: [get: Store<T>, set: SetStoreFunction<T>],
94-
options?: PersistenceOptions<T>,
94+
options?: PersistenceOptions<T,{}>,
9595
): [get: Store<T>, set: SetStoreFunction<T>];
9696

9797
/**

0 commit comments

Comments
 (0)