import type { Source } from "../io/source.js";
import { type RefusalCode } from "../vocabulary.js";
/** A path (Node) or URL string, bytes in hand, or a {@linkcode Source} opened by the caller. */
export type Target = Source | ArrayBufferView | ArrayBuffer | string;
export type Opener = (target: string) => Promise<Source | RefusalCode>;
export interface TargetLease {
    source: Source;
    release?(): Promise<void>;
}
/** Opens a string target that can only be a URL. */
export declare const viaUrl: Opener;
export declare function leaseOf(target: Target, open: Opener): Promise<TargetLease>;
