@amadeus-it-group/tansu
Version:
tansu is a lightweight, push-based framework-agnostic state management library. It borrows the ideas and APIs originally designed and implemented by Svelte stores and extends them with computed and batch.
10 lines (9 loc) • 539 B
TypeScript
import type { Readable, ReadableSignal, StoreInput } from '../types';
import type { RawStore } from './store';
/**
* Symbol used in {@link InteropObservable} allowing any object to expose an observable.
*/
export declare const symbolObservable: typeof Symbol.observable;
export declare const rawStoreSymbol: unique symbol;
export declare const getRawStore: <T>(storeInput: StoreInput<T>) => RawStore<T>;
export declare const exposeRawStore: <T, U>(rawStore: RawStore<T>, extraProp?: U) => ReadableSignal<T> & Omit<U, keyof Readable<T>>;