import { PatchKey } from '../utils/common_types.js'; import { WorldModules } from '../factory/WorldModules.js'; import { DataChunkStub } from '../datacontainers/ChunkContainer.js'; import { AsyncProcessingTaskHandler, BaseProcessingParams, ProcessingTask } from './TaskProcessing.js'; /** * Calling side */ export declare enum ChunksProcessingRange { LowerRange = "lower_range", UpperRange = "upper_range", FullRange = "full_range" } export type ChunksProcessingParams = BaseProcessingParams & { chunksRange?: ChunksProcessingRange; skipEntities?: boolean; skipBlobCompression?: boolean; skipEmpty?: boolean; fakeEmpty?: boolean; }; type TaskOptions = ChunksProcessingParams & { onStarted?: (...a: any) => any; onCompleted?: (...a: any) => any; onRejected?: (error: string) => any; }; export declare class ChunksTask extends ProcessingTask { static handlerId: string; constructor(); /** * Build templates for most common tasks, adjust manually if needed */ /** * Instance version (allow use from child classes) * @param chunksRange * @returns */ getBuildTemplate(chunksRange: ChunksProcessingRange): (input: PatchKey) => this; get lowerChunks(): (input: PatchKey) => this; get upperChunks(): (input: PatchKey) => this; get fullChunks(): (input: PatchKey) => this; /** * Static versions (allow better types inferance) * @param chunksRange * @returns */ static factory: (chunksRange: ChunksProcessingRange) => (patchKey: PatchKey, processingOptions?: TaskOptions) => ChunksTask; static get lowerChunks(): (patchKey: PatchKey, processingOptions?: TaskOptions) => ChunksTask; static get upperChunks(): (patchKey: PatchKey, processingOptions?: TaskOptions) => ChunksTask; static get fullChunks(): (patchKey: PatchKey, processingOptions?: TaskOptions) => ChunksTask; } export declare const ChunksProcessing: typeof ChunksTask; type ChunksProcessingHandler = AsyncProcessingTaskHandler; export declare const createChunksTaskHandler: (worldModules: WorldModules) => ChunksProcessingHandler; export {};