mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 08:13:50 +02:00
API: Updating typing for ns.singularity.getCurrentWork() (#989)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user