UNPKG

warscript

Version:

A typescript library for Warcraft III using Warpack.

32 lines (31 loc) 1.07 kB
/** @noSelfInFile */ import { Event } from "./event"; import { Player } from "./core/types/player"; import { Operation, OperationContinue, OperationMonitor } from "./operation"; export declare const onReceive: { [prefix: string]: Event<[Player, string]>; } & { [x: string]: Event<[Player, string]>; }; export declare function send(id: string, payload: string): void; export declare class SyncOperation extends Operation<string> { private readonly player; private readonly x; private readonly p; private readonly c; private readonly d; private readonly l; private e?; private w?; private r?; private i; private s; static get packetsPerRound(): number; static set packetsPerRound(value: number); constructor(player: Player, data: string); protected estimate(): Promise<number>; protected work(): string | Promise<OperationContinue | string>; protected doCancel(): boolean; private static readonly _; } export declare function synchronize(player: Player, data: string): OperationMonitor<string>;