/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Session } from "#session/Session.js";
export type SubscriptionId = number;
/**
 * A single active subscription.
 */
export interface Subscription {
    subscriptionId: SubscriptionId;
    isCanceledByPeer: boolean;
    handlePeerCancel(): Promise<void>;
    close(flushViaSession?: Session): Promise<void>;
}
export declare namespace Subscription {
    function idStrOf(subscription: undefined | number | {
        subscriptionId?: number;
    }): string | undefined;
    function diagnosticOf(subscription: undefined | number | {
        subscriptionId?: number;
    }): {
        "sub#": string | undefined;
    };
}
//# sourceMappingURL=Subscription.d.ts.map