From 38923af436269b178425d92014264545f42be17f Mon Sep 17 00:00:00 2001 From: Andriy Mykhaylyk Date: Mon, 3 Jan 2022 16:10:22 +0100 Subject: [PATCH] fix ns.run args type definition --- dist/bitburner.d.ts | 4 ++-- markdown/bitburner.ns.run.md | 4 ++-- src/ScriptEditor/NetscriptDefinitions.d.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index 44ab57d24..b0c94a0d0 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -2720,7 +2720,7 @@ export declare interface NS extends Singularity { * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value. * @returns Returns the PID of a successfully started script, and 0 otherwise. */ - run(script: string, numThreads?: number, ...args: string[]): number; + run(script: string, numThreads?: number, ...args: Array): number; /** * Start another script on any server. @@ -2760,7 +2760,7 @@ export declare interface NS extends Singularity { * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value. * @returns Returns the PID of a successfully started script, and 0 otherwise. */ - exec(script: string, host: string, numThreads?: number, ...args: string[]): number; + exec(script: string, host: string, numThreads?: number, ...args: Array): number; /** * Terminate current script and start another in 10s. diff --git a/markdown/bitburner.ns.run.md b/markdown/bitburner.ns.run.md index b809f4da8..a7fca9bde 100644 --- a/markdown/bitburner.ns.run.md +++ b/markdown/bitburner.ns.run.md @@ -9,7 +9,7 @@ Start another script on the current server. Signature: ```typescript -run(script: string, numThreads?: number, ...args: string[]): number; +run(script: string, numThreads?: number, ...args: Array): number; ``` ## Parameters @@ -18,7 +18,7 @@ run(script: string, numThreads?: number, ...args: string[]): number; | --- | --- | --- | | script | string | Filename of script to run. | | numThreads | number | Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer. | -| args | string\[\] | Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value. | +| args | Array | Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value. | Returns: diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index cfc02ffe9..ea87d96e4 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -4560,7 +4560,7 @@ export interface NS extends Singularity { * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value. * @returns Returns the PID of a successfully started script, and 0 otherwise. */ - run(script: string, numThreads?: number, ...args: string[]): number; + run(script: string, numThreads?: number, ...args: Array): number; /** * Start another script on any server.