@towercg2/server
Version:
The server runtime for the TowerCG2 video graphics system.
24 lines (23 loc) • 897 B
TypeScript
/// <reference types="express-serve-static-core" />
import { Reducer, DeepPartial, AnyAction } from "redux";
import { TickPluginState } from "@towercg2/client";
import { ServerPlugin } from "../../ServerPlugin";
export interface TickPluginConfig {
tickers: {
[name: string]: {
disabled?: boolean;
interval: number;
};
};
}
export declare class TickPlugin extends ServerPlugin<TickPluginConfig, TickPluginState> {
static readonly pluginName: string;
readonly DEFAULT_CONFIG: Partial<TickPluginConfig>;
private tickIntervals;
protected buildDefaultConfig(): TickPluginConfig;
protected buildDefaultState(): DeepPartial<TickPluginState>;
protected buildReducer(): Reducer<TickPluginState, AnyAction>;
initialize(http: Express.Application): Promise<void>;
cleanup(): Promise<void>;
private _handleTick(tickerName);
}