DOC: Fix outdated example for ns.spawn() (#1101)

This commit is contained in:
adeilt
2024-02-15 20:44:25 -08:00
committed by GitHub
parent ef334cb851
commit 22aec2a8b9
2 changed files with 4 additions and 4 deletions

View File

@@ -6054,10 +6054,10 @@ export interface NS {
* @example
* ```js
* //The following example will execute the script foo.js with 10 threads, in 500 milliseconds and the arguments foodnstuff and 90:
* ns.spawn('foo.js', 10, 500, 'foodnstuff', 90);
* ns.spawn('foo.js', {threads: 10, spawnDelay: 500}, 'foodnstuff', 90);
* ```
* @param script - Filename of script to execute.
* @param threadOrOptions - Either an integer number of threads for new script, or a {@link SpawnOptions} object. Threads defaults to 1.
* @param threadOrOptions - Either an integer number of threads for new script, or a {@link SpawnOptions} object. Threads defaults to 1 and spawnDelay defaults to 10,000 ms.
* @param args - Additional arguments to pass into the new script that is being run.
*/
spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: (string | number | boolean)[]): void;