two-slot-extended-mags/types/context/ApplicationContext.d.ts
Platinum c50b92356b Update to 3.9.X
Reviewed-on: #1
Co-authored-by: Platinum <platinumgamer@hotmail.com>
Co-committed-by: Platinum <platinumgamer@hotmail.com>
2024-08-05 10:45:19 +00:00

21 lines
1003 B
TypeScript

import { ContextVariable } from "@spt/context/ContextVariable";
import { ContextVariableType } from "@spt/context/ContextVariableType";
export declare class ApplicationContext {
private variables;
private static holderMaxSize;
/**
* Called like:
* ```
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
*
* const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue<string>();
*
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION).getValue<IGetRaidConfigurationRequestData>();
* ```
*/
getLatestValue(type: ContextVariableType): ContextVariable | undefined;
getValues(type: ContextVariableType): ContextVariable[] | undefined;
addValue(type: ContextVariableType, value: any): void;
clearValues(type: ContextVariableType): void;
}