1 | import { Client, OperationContext, OperationResult, TypedDocumentNode } from '@urql/core';
|
2 | import { Atom, Getter } from 'jotai';
|
3 | declare type OperationResultWithData<Data, Variables> = OperationResult<Data, Variables> & {
|
4 | data: Data;
|
5 | };
|
6 | declare type SubscriptionArgs<Data, Variables extends object> = {
|
7 | query: TypedDocumentNode<Data, Variables> | string;
|
8 | variables?: Variables;
|
9 | context?: Partial<OperationContext>;
|
10 | };
|
11 | declare type SubscriptionArgsWithPause<Data, Variables extends object> = SubscriptionArgs<Data, Variables> & {
|
12 | pause: boolean;
|
13 | };
|
14 | export declare function atomWithSubscription<Data, Variables extends object>(createSubscriptionArgs: (get: Getter) => SubscriptionArgs<Data, Variables>, getClient?: (get: Getter) => Client): Atom<OperationResultWithData<Data, Variables>>;
|
15 | export declare function atomWithSubscription<Data, Variables extends object>(createSubscriptionArgs: (get: Getter) => SubscriptionArgsWithPause<Data, Variables>, getClient?: (get: Getter) => Client): Atom<OperationResultWithData<Data, Variables> | null>;
|
16 | export {};
|