@hashgraph/hedera-cli
Version:
CLI tool to manage and setup developer environments for Hedera Hashgraph.
26 lines (18 loc) • 454 B
text/typescript
import { State as StateInterface } from '../../../types';
class StateMock {
private state: Record<string, any> = {};
set(key: string, value: any): void {
this.state[key] = value;
}
setAll(data: StateInterface): void {
this.state = { ...data };
}
get(key: string): any {
return this.state[key];
}
getAll(): StateInterface {
return this.state as StateInterface;
}
}
const state = new StateMock();
export { state };