From 31ed5d8f64ad3bf78665b0bb85ecfbe77dfd2846 Mon Sep 17 00:00:00 2001 From: TheMas3212 Date: Fri, 31 Dec 2021 10:58:56 +1100 Subject: [PATCH] Add Function Call signatures to ns.kill so typescript is able to call ns.kill(pid) previously it will fail to compile due to not providing a host argument --- src/ScriptEditor/NetscriptDefinitions.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 01a405a47..5069c5d9c 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -4680,8 +4680,10 @@ 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; + kill(script: string | number, host: string, ...args: string[]): boolean; + /** * Terminate all scripts on a server. * @remarks