@reactant/context
Version:
24 lines (23 loc) • 640 B
TypeScript
export default class State<T = {
[key: string]: any;
}> {
name: string;
postprocess: (state: T) => T;
_isMaster: boolean;
_masterPid: number;
_parentMasterPid: number | null;
_state: T;
currentProcStarted: boolean;
projectName: string;
statePath: string;
stateDir: string;
constructor(name?: string, postprocess?: (state: T) => T);
getParentMasterPid(): number | null;
get masterPid(): number;
get isMaster(): boolean;
get isStarted(): boolean;
get state(): T | undefined;
set state(state: T | undefined);
processAlive(pid: number): boolean;
finish(): void;
}