UNPKG

@overextended/ox_lib

Version:
13 lines (12 loc) 558 B
export declare class StateBag { protected statebag: string; constructor(statebag?: string); /** Writes a value to the statebag. Replicated values set from the client are send to the server for validation. */ set(key: string, value: unknown, replicated?: boolean): Promise<boolean>; /** Returns a value from the statebag. */ get<T = unknown>(key: string): T | undefined; /** Returns if a key exists on the statebag. */ has(key: string): boolean; /** Returns an array of all keys on the statebag. */ keys(): string[]; }