Server/project/src/context/ContextVariable.ts

26 lines
566 B
TypeScript
Raw Normal View History

import { ContextVariableType } from "@spt/context/ContextVariableType";
2023-03-03 15:23:46 +00:00
export class ContextVariable {
2023-03-03 15:23:46 +00:00
private value: any;
private timestamp: Date;
private type: ContextVariableType;
constructor(value: any, type: ContextVariableType) {
2023-03-03 15:23:46 +00:00
this.value = value;
this.timestamp = new Date();
this.type = type;
}
public getValue<T>(): T {
2023-03-03 15:23:46 +00:00
return this.value;
}
public getTimestamp(): Date {
2023-03-03 15:23:46 +00:00
return this.timestamp;
}
public getType(): ContextVariableType {
2023-03-03 15:23:46 +00:00
return this.type;
}
2023-11-15 20:35:05 -05:00
}