Skip to content

Commit

Permalink
feat: improve export
Browse files Browse the repository at this point in the history
  • Loading branch information
mbret committed Jul 16, 2024
1 parent d14abfa commit 9fe40e7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/state/persistance/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Signal } from "../signal"
import { type SignalValue, type Signal } from "../signal"
import type { IDENTIFIER_PERSISTANCE_KEY } from "./constants"

export interface Adapter {
Expand All @@ -14,14 +14,14 @@ export interface PersistanceEntry {
[IDENTIFIER_PERSISTANCE_KEY]: typeof IDENTIFIER_PERSISTANCE_KEY
}

export interface SignalPersistenceConfig<Value> {
export interface SignalPersistenceConfig<S extends Signal<any, any, string>> {
version: number
signal: Signal<any, Value, string>
signal: S
/**
* Only called if there is a value to hydrate
*/
hydrate?: (params: {
version: number
value: Value
}) => Value
value: SignalValue<S>
}) => SignalValue<S>
}

0 comments on commit 9fe40e7

Please sign in to comment.