warframe-worldstate-parser
Version:
An Open parser for Warframe's Worldstate in Javascript
87 lines (86 loc) • 2.15 kB
TypeScript
/**
* Represents an upgrade that applies to all players
*/
export default class GlobalUpgrade {
/**
* @param {object} data The global upgrade data
* @param {object} deps The dependencies object
* @param {string} deps.locale Locale to use for translations
*/
constructor(data: object, { locale }?: {
locale: string;
});
/**
* The time and date at which the global upgrade starts being active
* @type {Date}
*/
activation: Date;
/**
* @deprecated Use `activation` instead
*/
start: Date;
/**
* The time and date at which the global upgrade stops being active
* @type {Date}
*/
expiry: Date;
/**
* @deprecated Use `expiry` instead
*/
end: any;
/**
* The effect of the upgrade
* @type {string}
*/
upgrade: string;
/**
* The operation type
* @type {string}
*/
operation: string;
/**
* Symbol for operation
* @type {string}
*/
operationSymbol: string;
/**
* The operation value
* @type {string}
*/
upgradeOperationValue: string;
/**
* Whether or not this is expired (at time of object creation)
* @type {boolean}
*/
expired: boolean;
/**
* ETA string (at time of object creation)
* @type {string}
*/
eta: string;
/**
* Plaintext description of upgrade
* @type {string}
*/
desc: string;
/**
* Get whether or not the event has expired
* @returns {boolean} whether the event has expired
*/
getExpired(): boolean;
/**
* Get a string indicating how long it will take for the upgrade to expire
* @returns {string} estimated timer of the upgrade
*/
getETAString(): string;
/**
* Turn the global upgrade into a plain text description
* @returns {string} Descriptio
*/
compileDesription(): string;
/**
* Returns a string representation of the upgrade
* @returns {string} string representation
*/
toString(): string;
}