API: Make ns.spawn return never instead of void (#2798)

This commit is contained in:
catloversg
2026-05-22 07:59:30 +07:00
committed by GitHub
parent 0e39a5f603
commit da4c7a01dd
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ Terminate current script and start another in a defined number of milliseconds.
**Signature:** **Signature:**
```typescript ```typescript
spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: ScriptArg[]): void; spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: ScriptArg[]): never;
``` ```
## Parameters ## Parameters
@@ -82,7 +82,7 @@ Additional arguments to pass into the new script that is being run.
**Returns:** **Returns:**
void never
## Remarks ## Remarks
+1 -1
View File
@@ -7950,7 +7950,7 @@ export interface NS {
* @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 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. * @param args - Additional arguments to pass into the new script that is being run.
*/ */
spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: ScriptArg[]): void; spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: ScriptArg[]): never;
/** /**
* Returns the currently running script. * Returns the currently running script.