Skip to content

Commit aef4561

Browse files
David Biereggeratk
authored andcommitted
Tweak a few little things
1 parent 2582159 commit aef4561

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/storage/src/persisted.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1+
import type {Setter, Signal} from "solid-js";
12
import {createUniqueId, untrack} from "solid-js";
3+
import type {SetStoreFunction, Store} from "solid-js/store";
24
import {reconcile} from "solid-js/store";
3-
import type {Accessor, Setter, Signal} from "solid-js";
4-
import type {Store, SetStoreFunction} from "solid-js/store";
5-
import type {StorageWithOptions, AsyncStorage, AsyncStorageWithOptions} from "./types.js";
5+
import type {AsyncStorage, AsyncStorageWithOptions, StorageWithOptions} from "./types.js";
66

77
export type PersistenceBaseOptions<T> = {
88
name?: string;
99
serialize?: (data: T) => string;
1010
deserialize?: (data: string) => T;
1111
}
1212

13-
export type PersistenceOptions<T, O extends Record<string, any> = {}> = PersistenceBaseOptions<T> & (
14-
{
15-
storage?: Storage | AsyncStorage;
16-
} |
13+
export type PersistenceOptions<T, O extends Record<string, any>> =
14+
PersistenceBaseOptions<T> & (
1715
{
1816
storage: StorageWithOptions<O> | AsyncStorageWithOptions<O>;
1917
storageOptions: O;
20-
});
18+
} |
19+
{ storage?: Storage | AsyncStorage; })
2120

2221
/**
2322
* Persists a signal, store or similar API

0 commit comments

Comments
 (0)