///
import type { O } from 'ts-toolbelt';
import type { BoardProps } from 'boardgame.io/react';
import type { BuiltinEffect, EffectsMap, EffectWithCreate, EffectPayload } from '../types';
/**
* Interface provided by the `useEffectQueue` hook for manipulating
* the current effect queue.
*/
export interface QueueAPI {
clear: () => void;
flush: () => void;
update: () => void;
size: number;
}
/**
* Return type for all effect listener callbacks.
*/
declare type CbReturn = void | (() => void);
/**
* Type of callback when listening for all effects with '*'.
*/
declare type AllEffectsCb = (...cbArgs: O.UnionOf<{
[K in keyof E]: E[K] extends EffectWithCreate ? [K, EffectPayload, BoardProps] : [K, undefined, BoardProps];
}>) => CbReturn;
/**
* Type of callback when listening for a specific effect.
*/
declare type EffectCb = E[K] extends EffectWithCreate ? (payload: EffectPayload, context: BoardProps) => CbReturn : (payload: undefined, context: BoardProps) => CbReturn;
export declare type ListenerArgs = ['*', AllEffectsCb, React.DependencyList] | [
'*',
AllEffectsCb,
React.DependencyList,
AllEffectsCb,
React.DependencyList
] | O.UnionOf<{
[K in keyof E]: [K, EffectCb, React.DependencyList] | [
K,
EffectCb,
React.DependencyList,
EffectCb,
React.DependencyList
];
}> | [BuiltinEffect, () => CbReturn, React.DependencyList];
export {};