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
+2 -2
View File
@@ -1,4 +1,4 @@
import type { Singularity as ISingularity } from "@nsdefs";
import type { Singularity as ISingularity, Task as ITask } from "@nsdefs";
import { Player } from "@player";
import {
@@ -1137,7 +1137,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
getCurrentWork: (ctx) => () => {
helpers.checkSingularityAccess(ctx);
if (!Player.currentWork) return null;
return Player.currentWork.APICopy();
return Player.currentWork.APICopy() as ITask;
},
exportGame: (ctx) => () => {
helpers.checkSingularityAccess(ctx);