UNPKG

@hastearcade/snowglobe

Version:

A TypeScript port of CrystalOrb, a high-level Rust game networking library

22 lines 1.18 kB
import { type Cloneable } from './cloneable'; import { type Disposable } from './disposable'; import * as Timestamp from './timestamp'; import { type OwnedEntity } from './types'; export interface Command extends Cloneable, Disposable, OwnedEntity { } export declare class CommandBuffer<$Command extends Command> implements Cloneable { readonly map: Map<Timestamp.Timestamp, Array<Timestamp.Timestamped<$Command>>>; private _timestamp; constructor(map?: Map<Timestamp.Timestamp, Array<Timestamp.Timestamped<$Command>>>, _timestamp?: Timestamp.Timestamp); timestamp(): Timestamp.Timestamp; private filterStaleTimestamps; updateTimestamp(timestamp: Timestamp.Timestamp): void; drainAll(): Timestamp.Timestamped<$Command>[]; drainUpTo(timestamp: Timestamp.Timestamp): Timestamp.Timestamped<$Command>[]; insert(timestampedCommand: Timestamp.Timestamped<$Command>): void; commandsAt(timestamp: Timestamp.Timestamp): Timestamp.Timestamped<$Command>[] | undefined; length(): number; [Symbol.iterator](): IterableIterator<[Timestamp.Timestamp, Timestamp.Timestamped<$Command>[]]>; clone(): this; } //# sourceMappingURL=command.d.ts.map