API: Updating typing for ns.singularity.getCurrentWork() (#989)

This commit is contained in:
Rinne
2023-12-27 08:06:45 -03:00
committed by GitHub
parent 550829a1c3
commit eba840dcd3
47 changed files with 514 additions and 29 deletions

View File

@@ -1579,6 +1579,87 @@ export interface TIX {
nextUpdate(): Promise<number>;
}
/**
* Study
* @remarks
* An object representing the current study task
* @public
*/
export interface StudyTask {
type: "CLASS";
cyclesWorked: number;
classType: string;
location: string;
}
/**
* Company Work
* @remarks
* An object representing the current work for a company
* @public
*/
export interface CompanyWorkTask {
type: "COMPANY";
cyclesWorked: number;
companyName: CompanyName;
}
/**
* Create Program
* @remarks
* An object representing the status of the program being created
* @public
*/
export interface CreateProgramWorkTask {
type: "CREATE_PROGRAM";
cyclesWorked: number;
programName: string;
}
/**
* Crime
* @remarks
* An object representing the crime being commited
* @public
*/
export interface CrimeTask {
type: "CRIME";
cyclesWorked: number;
crimeType: CrimeType;
}
/**
* Faction Work
* @remarks
* An object representing the current work for a faction
* @public
*/
export interface FactionWorkTask {
type: "FACTION";
cyclesWorked: number;
factionWorkType: FactionWorkType;
factionName: string;
}
/**
* Faction Work
* @remarks
* An object representing the current grafting status
* @public
*/
export interface GraftingTask {
type: "GRAFTING";
cyclesWorked: number;
augmentation: string;
}
/**
* Task
* @remarks
* Represents any task, such as studying, working for a faction etc.
* @public
*/
export type Task = StudyTask | CompanyWorkTask | CreateProgramWorkTask | CrimeTask | FactionWorkTask | GraftingTask;
/**
* Singularity API
* @remarks
@@ -2487,7 +2568,7 @@ export interface Singularity {
*
* @returns - An object representing the current work. Fields depend on the kind of work.
*/
getCurrentWork(): any | null;
getCurrentWork(): Task | null;
}
/**