Merge pull request #2243 from TheMas3212/dev

Add Function Call signatures to ns.kill so typescript is able to call ns.kill correctly
This commit is contained in:
hydroflame
2022-01-02 11:39:56 -05:00
committed by GitHub
2 changed files with 9 additions and 6 deletions

View File

@@ -4680,8 +4680,9 @@ export interface NS extends Singularity {
* @param args - Arguments to identify which script to kill.
* @returns True if the script is successfully killed, and false otherwise.
*/
kill(script: string | number, host: string, ...args: string[]): boolean;
kill(script: number): boolean;
kill(script: string, host: string, ...args: string[]): boolean;
/**
* Terminate all scripts on a server.
* @remarks
@@ -5543,7 +5544,8 @@ export interface NS extends Singularity {
* @param args - Arguments that the script is running with.
* @returns Amount of income the specified script generates while online.
*/
getScriptIncome(script: string, host: string, ...args: string[]): number | [number, number];
getScriptIncome(): [number, number];
getScriptIncome(script: string, host: string, ...args: string[]): number;
/**
* Get the exp gain of a script.
@@ -5562,6 +5564,7 @@ export interface NS extends Singularity {
* @param args - Arguments that the script is running with.
* @returns Amount of hacking experience the specified script generates while online.
*/
getScriptExpGain(): number;
getScriptExpGain(script: string, host: string, ...args: string[]): number;
/**