import Actor from '../util/actor';
import StyleLayerIndex from '../style/style_layer_index';
import RasterDEMTileWorkerSource from './raster_dem_tile_worker_source';
import type { WorkerSource, WorkerTileParameters, WorkerDEMTileParameters, WorkerTileCallback, WorkerDEMTileCallback, TileParameters } from '../source/worker_source';
import type { WorkerGlobalScopeInterface } from '../util/web_worker';
import type { Callback } from '../types/callback';
import type { LayerSpecification } from '../style-spec/types';
import type { PluginState } from './rtl_text_plugin';
/**
 * @private
 */
export default class Worker {
    self: WorkerGlobalScopeInterface;
    actor: Actor;
    layerIndexes: {
        [_: string]: StyleLayerIndex;
    };
    availableImages: {
        [_: string]: Array<string>;
    };
    workerSourceTypes: {
        [_: string]: {
            new (...args: any): WorkerSource;
        };
    };
    workerSources: {
        [_: string]: {
            [_: string]: {
                [_: string]: WorkerSource;
            };
        };
    };
    demWorkerSources: {
        [_: string]: {
            [_: string]: RasterDEMTileWorkerSource;
        };
    };
    referrer: string | undefined | null;
    constructor(self: WorkerGlobalScopeInterface);
    setReferrer(mapID: string, referrer: string): void;
    setImages(mapId: string, images: Array<string>, callback: WorkerTileCallback): void;
    setLayers(mapId: string, layers: Array<LayerSpecification>, callback: WorkerTileCallback): void;
    updateLayers(mapId: string, params: {
        layers: Array<LayerSpecification>;
        removedIds: Array<string>;
    }, callback: WorkerTileCallback): void;
    loadTile(mapId: string, params: WorkerTileParameters & {
        type: string;
    }, callback: WorkerTileCallback): void;
    loadDEMTile(mapId: string, params: WorkerDEMTileParameters, callback: WorkerDEMTileCallback): void;
    reloadTile(mapId: string, params: WorkerTileParameters & {
        type: string;
    }, callback: WorkerTileCallback): void;
    abortTile(mapId: string, params: TileParameters & {
        type: string;
    }, callback: WorkerTileCallback): void;
    removeTile(mapId: string, params: TileParameters & {
        type: string;
    }, callback: WorkerTileCallback): void;
    removeDEMTile(mapId: string, params: TileParameters): void;
    removeSource(mapId: string, params: {
        source: string;
    } & {
        type: string;
    }, callback: WorkerTileCallback): void;
    /**
     * Load a {@link WorkerSource} script at params.url.  The script is run
     * (using importScripts) with `registerWorkerSource` in scope, which is a
     * function taking `(name, workerSourceObject)`.
     *  @private
     */
    loadWorkerSource(map: string, params: {
        url: string;
    }, callback: Callback<void>): void;
    syncRTLPluginState(map: string, state: PluginState, callback: Callback<boolean>): void;
    getAvailableImages(mapId: string): string[];
    getLayerIndex(mapId: string): StyleLayerIndex;
    getWorkerSource(mapId: string, type: string, source: string): WorkerSource;
    getDEMWorkerSource(mapId: string, source: string): RasterDEMTileWorkerSource;
    enforceCacheSizeLimit(mapId: string, limit: number): void;
}
//# sourceMappingURL=worker.d.ts.map