UNPKG

313 BTypeScriptView Raw
1import { AnyActorRef } from 'xstate';
2export declare function useSelector<TActor extends Pick<AnyActorRef, 'subscribe' | 'getSnapshot'> | undefined, T>(actor: TActor, selector: (snapshot: TActor extends {
3 getSnapshot(): infer TSnapshot;
4} ? TSnapshot : undefined) => T, compare?: (a: T, b: T) => boolean): T;