d13e86ba46
Rebranded src code and scripts to SPT Co-authored-by: clodan <clodan@clodan.com> Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/345 Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com> Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>
31 lines
582 B
TypeScript
31 lines
582 B
TypeScript
import { ContextVariableType } from "@spt/context/ContextVariableType";
|
|
|
|
export class ContextVariable
|
|
{
|
|
private value: any;
|
|
private timestamp: Date;
|
|
private type: ContextVariableType;
|
|
|
|
constructor(value: any, type: ContextVariableType)
|
|
{
|
|
this.value = value;
|
|
this.timestamp = new Date();
|
|
this.type = type;
|
|
}
|
|
|
|
public getValue<T>(): T
|
|
{
|
|
return this.value;
|
|
}
|
|
|
|
public getTimestamp(): Date
|
|
{
|
|
return this.timestamp;
|
|
}
|
|
|
|
public getType(): ContextVariableType
|
|
{
|
|
return this.type;
|
|
}
|
|
}
|