import type { GeoProjection } from "d3-geo";
export type TileURLTemplate = string | ((z: number, x: number, y: number, dpr: number) => string);
interface CachedTile {
    img: HTMLImageElement;
    loaded: boolean;
    key: string;
    lastUsed: number;
}
export declare class TileCache {
    private cache;
    private limit;
    constructor(limit?: number);
    get(key: string): CachedTile | undefined;
    set(key: string, entry: CachedTile): void;
    private evict;
    clear(): void;
}
export interface TileRenderOptions {
    tileURL: TileURLTemplate;
    projection: GeoProjection;
    width: number;
    height: number;
    tileCache: TileCache;
    onTileLoad?: () => void;
}
/**
 * Render visible tiles onto a canvas context.
 * Returns true if all visible tiles are loaded (no pending fetches).
 */
export declare function renderTiles(ctx: CanvasRenderingContext2D, options: TileRenderOptions): boolean;
export {};
