/** @packageDocumentation * @module Utilities */ import { IDisposable } from "@bentley/bentleyjs-core"; /** * A custom hook which creates a disposable object and manages its disposal on unmount * or factory method change. * @public */ export declare function useDisposable(createDisposable: () => TDisposable): TDisposable; /** * A custom hook which calls the factory method to create a disposable object * which might as well be undefined. If the result was a disposable object, the * hook takes care of disposing it when necessary. * @public */ export declare function useOptionalDisposable(createDisposable: () => TDisposable | undefined): TDisposable | undefined; //# sourceMappingURL=useDisposable.d.ts.map