Merge pull request #2309 from erplsf/dev

fix ns.run args type definition
This commit is contained in:
hydroflame 2022-01-03 15:43:29 -05:00 committed by GitHub
commit ea3a1e5a2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

4
dist/bitburner.d.ts vendored

@ -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. * @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. * @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<string | number | boolean>): number;
/** /**
* Start another script on any server. * 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. * @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. * @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<string | number | boolean>): number;
/** /**
* Terminate current script and start another in 10s. * Terminate current script and start another in 10s.

@ -9,7 +9,7 @@ Start another script on the current server.
<b>Signature:</b> <b>Signature:</b>
```typescript ```typescript
run(script: string, numThreads?: number, ...args: string[]): number; run(script: string, numThreads?: number, ...args: Array<string | number | boolean>): number;
``` ```
## Parameters ## Parameters
@ -18,7 +18,7 @@ run(script: string, numThreads?: number, ...args: string[]): number;
| --- | --- | --- | | --- | --- | --- |
| script | string | Filename of script to run. | | 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. | | 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<string | number | boolean> | 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. |
<b>Returns:</b> <b>Returns:</b>

@ -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. * @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. * @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<string | number | boolean>): number;
/** /**
* Start another script on any server. * Start another script on any server.