UNPKG

react-barcode-scanner

Version:

A barcode scanner base on Barcode Detector

10 lines (9 loc) 438 B
type SubscriberFunc<S> = (newState: S) => void; export interface Atom<S> { set(newValue: S): void; subscriptions: Array<SubscriberFunc<S>>; } export declare function createAtom<S>(): Atom<S>; export declare function useAtom<S>(atom: Atom<S>, initialState: S | (() => S)): [S, SubscriberFunc<S>]; export declare function useAtom<S = undefined>(atom: Atom<S | undefined>): [S | undefined, SubscriberFunc<S | undefined>]; export {};