/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
export interface ReferenceCounted {
    referenceAdded(): void;
    referenceRemoved(): void;
    /**
     * @returns true if mutating this object may impact other users of it.
     *
     * Implementations can return true if the refcount is 1 OR the content is logically immutable.
     */
    isShared(): boolean;
}
/**
 * Base class to assist with implementing ReferenceCounted.
 */
export declare abstract class ReferenceCountedBase implements ReferenceCounted {
    private refCount;
    protected constructor(refCount?: number);
    referenceAdded(count?: number): void;
    referenceRemoved(count?: number): void;
    isShared(): boolean;
    isUnreferenced(): boolean;
    /**
     * Called when refcount reaches 0.
     */
    protected abstract dispose(): void;
}
//# sourceMappingURL=referenceCounting.d.ts.map