/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { File } from "./File.js";
/**
 * Tracks open {@link File.Handle} instances for leak detection.
 *
 * Uses {@link FinalizationRegistry} to detect handles that are garbage-collected without being closed, and maintains a
 * set of open handles to warn about at process exit.  Both mechanisms are diagnostic-only — no cleanup is attempted.
 */
export declare namespace FileHandleTracker {
    /**
     * Register an opened file handle for leak tracking.
     */
    function register(handle: File.Handle): void;
    /**
     * Unregister a file handle when it is closed.
     */
    function unregister(handle: File.Handle): void;
    /**
     * Install a callback that runs at process exit to warn about unclosed handles.  Platform packages (e.g.
     * @matter/nodejs) should call this with their exit hook mechanism.
     */
    function onExit(install: (callback: () => void) => void): void;
}
//# sourceMappingURL=FileHandleTracker.d.ts.map