import * as erreur from 'erreur'; type Unsubscribe = () => void; type OnUnsubscribed = () => void; type SubscriptionCallback = (value: T) => void; type VoidSubscriptionCallback = () => void; type UnsubscribeAllMethod = () => void; type SubscribeMethod = (callback: SubscriptionCallback, onUnsubscribe?: OnUnsubscribed) => Unsubscribe; type SubscribeByIdMethod = (subId: string, callback: SubscriptionCallback, onUnsubscribe?: OnUnsubscribed) => Unsubscribe; type VoidSubscribeMethod = (callback: VoidSubscriptionCallback, onUnsubscribe?: OnUnsubscribed) => Unsubscribe; type VoidSubscribeByIdMethod = (subId: string, callback: VoidSubscriptionCallback, onUnsubscribe?: OnUnsubscribed) => Unsubscribe; type IsSubscribedMethod = (callback: SubscriptionCallback) => boolean; type IsSubscribedByIdMethod = (subId: string) => boolean; type UnsubscribeMethod = (callback: SubscriptionCallback) => void; type UnsubscribeByIdMethod = (subId: string) => void; type VoidIsSubscribedMethod = (callback: VoidSubscriptionCallback) => boolean; type VoidIsSubscribedByIdMethod = (subId: string) => boolean; type VoidUnsubscribeMethod = (callback: VoidSubscriptionCallback) => void; type VoidUnsubscribeByIdMethod = (subId: string) => void; type ChannelMethod = (channel: Channel) => ISubscription; type VoidChannelMethod = (channel: Channel) => IVoidSubscription; type DeferredMethod = (callback: () => Result) => Result; interface ISubscription { subscribe: SubscribeMethod; subscribeById: SubscribeByIdMethod; unsubscribe: UnsubscribeMethod; unsubscribeById: UnsubscribeByIdMethod; isSubscribed: IsSubscribedMethod; isSubscribedById: IsSubscribedByIdMethod; unsubscribeAll: UnsubscribeAllMethod; size: () => number; emit: (newValue: Data) => void; deferred: DeferredMethod; destroy: () => void; isDestroyed: () => boolean; channel: ChannelMethod; } interface IVoidSubscription { subscribe: VoidSubscribeMethod; subscribeById: VoidSubscribeByIdMethod; unsubscribe: VoidUnsubscribeMethod; unsubscribeById: VoidUnsubscribeByIdMethod; isSubscribed: VoidIsSubscribedMethod; isSubscribedById: VoidIsSubscribedByIdMethod; unsubscribeAll: UnsubscribeAllMethod; size: () => number; emit: () => void; deferred: DeferredMethod; destroy: () => void; isDestroyed: () => boolean; channel: VoidChannelMethod; } type MultiCreateChannelMethod = () => ISubscription; type MultiCreateVoidChannelMethod = () => IVoidSubscription; interface IMultiSubscription { unsubscribeAll: UnsubscribeAllMethod; size: () => number; deferred: DeferredMethod; destroy: () => void; isDestroyed: () => boolean; createChannel: MultiCreateChannelMethod; createVoidChannel: MultiCreateVoidChannelMethod; } interface ISubscriptionOptions { onFirstSubscription?: () => void; onLastUnsubscribe?: () => void; onDestroy?: () => void; maxSubscriptionCount?: number; maxRecursiveEmit?: number; maxUnsubscribeAllLoop?: number; } declare const Suub: { createSubscription: (options?: ISubscriptionOptions) => ISubscription; createVoidSubscription: (options?: ISubscriptionOptions) => IVoidSubscription; createMultiSubscription: () => IMultiSubscription; }; declare const SuubErreur: { SubscriptionDestroyed: erreur.ErreurDeclaration; MaxSubscriptionCountReached: erreur.ErreurDeclaration; MaxRecursiveEmitReached: erreur.ErreurDeclaration<{ limit: number; }, [limit: number]>; MaxUnsubscribeAllLoopReached: erreur.ErreurDeclaration<{ limit: number; }, [limit: number]>; InvalidCallback: erreur.ErreurDeclaration; }; export { ChannelMethod, DeferredMethod, IMultiSubscription, ISubscription, ISubscriptionOptions, IVoidSubscription, IsSubscribedByIdMethod, IsSubscribedMethod, MultiCreateChannelMethod, MultiCreateVoidChannelMethod, OnUnsubscribed, SubscribeByIdMethod, SubscribeMethod, SubscriptionCallback, Suub, SuubErreur, Unsubscribe, UnsubscribeAllMethod, UnsubscribeByIdMethod, UnsubscribeMethod, VoidChannelMethod, VoidIsSubscribedByIdMethod, VoidIsSubscribedMethod, VoidSubscribeByIdMethod, VoidSubscribeMethod, VoidSubscriptionCallback, VoidUnsubscribeByIdMethod, VoidUnsubscribeMethod };