API reference > @kontsedal/olas-persist > PersistableSource
PersistableSource type
What createPersisted can persist: anything with value, set andsubscribe, such as a Signal<T> or a Field<T>. subscribe may call the handler at once with the current value, or only on a change.
Signature:
typescript
export type PersistableSource<T> = {
readonly value: T;
set(value: T): void;
subscribe(handler: (value: T) => void): () => void;
};