import { default as PSPDFKitType } from 'pspdfkit'; /** * Tear down a PSPDFKit instance for a container without ever throwing. * * A password-protected PDF makes PSPDFKit render its own built-in password * dialog and stay mid-load (the `PSPDFKit.load()` Promise never resolves, so no * instance is ever assigned). Calling `PSPDFKit.unload(container)` while the * container is still loading throws — which previously propagated out of the * viewer's close handler and aborted it before the host was told to close. The * user was then stuck on the password prompt with no way out but a full browser * refresh (neither Exit nor Esc worked). * * Swallowing the unload error here keeps close/unmount teardown resilient: the * container is removed from the DOM by the unmount that follows, which is what * actually disposes the stuck dialog. */ export declare function safePspdfkitUnload(pspdfkit: Pick | undefined, container: HTMLElement | null): void;