import { Definitions, StylePriority, StyleSet } from "./Theme"; import { WorkerServiceProtocol } from "./WorkerServiceProtocol"; /** * Interface for `OptionsMap` which describes a general structure of key-value pairs. */ export interface OptionsMap { [name: string]: any; } /** * Allows to cancel and prioritize requests inside the requestQueue. * * @remarks * Useful to optimize the order of decoding tiles during animations and camera movements. * * `RequestController` is not extending [[AbortController]], because this is not supported in ES5. */ export declare class RequestController implements AbortController { priority: number; abortController: AbortController; /** * Creates an instance of `RequestController`. * * @param {number} priority * @param {AbortController} abortController Optional [[AbortController]] used internally, since * [[AbortController]]s should not be subclassed. */ constructor(priority?: number, abortController?: AbortController); get signal(): AbortSignal; /** * Invoking this method will set this object's AbortSignal's aborted flag and * signal to any observers that the associated activity is to be aborted. */ abort(): void; } /** * Communication protocol with [[ITileDecoder]]. */ export declare namespace WorkerDecoderProtocol { /** * Define possible names of messages exchanged with decoder services within `WebWorker`. */ enum DecoderMessageName { Configuration = "configuration" } /** * Interface for `DecodedTileMessage` which describes metadata for a decoded tile. */ interface DecoderMessage { service: string; type: DecoderMessageName; } /** * Interface for a ConfigurationMessage that is sent from the datasource to the decoder. The * message used to configure the [[ITileDecoder]]. */ interface ConfigurationMessage extends DecoderMessage { type: DecoderMessageName.Configuration; styleSet?: StyleSet; definitions?: Definitions; priorities?: StylePriority[]; labelPriorities?: string[]; options?: OptionsMap; languages?: string[]; } /** * Type guard to check if an object is an instance of `ConfigurationMessage`. */ function isConfigurationMessage(message: any): message is ConfigurationMessage; /** * Define possible names of requests called on decoder services within `WebWorker`. */ enum Requests { DecodeTileRequest = "decode-tile-request", TileInfoRequest = "tile-info-request" } /** * This object is sent to the decoder asking to decode a specific tile. The expected response * type is a [[DecodedTile]]. */ interface DecodeTileRequest extends WorkerServiceProtocol.ServiceRequest { type: Requests.DecodeTileRequest; tileKey: number; data: ArrayBufferLike; projection: string; } /** * Type guard to check if an object is a decoded tile object sent to a worker. */ function isDecodeTileRequest(message: any): message is DecodeTileRequest; /** * This object is sent to the decoder asking for a tile info of a specific tile. The expected * response type is a [[DecodedTile]]. */ interface TileInfoRequest extends WorkerServiceProtocol.ServiceRequest { type: Requests.TileInfoRequest; tileKey: number; data: ArrayBufferLike; projection: string; } /** * Type guard to check if an object is an info tile object sent to a worker. */ function isTileInfoRequest(message: any): message is TileInfoRequest; } //# sourceMappingURL=WorkerDecoderProtocol.d.ts.map