mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-23 08:02:04 +02:00
API: Make ns.spawn return never instead of void (#2798)
This commit is contained in:
@@ -9,7 +9,7 @@ Terminate current script and start another in a defined number of milliseconds.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: ScriptArg[]): void;
|
||||
spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: ScriptArg[]): never;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -82,7 +82,7 @@ Additional arguments to pass into the new script that is being run.
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
never
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
+1
-1
@@ -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 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.
|
||||
|
||||
Reference in New Issue
Block a user