mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-23 16:06:33 +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:**
|
**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
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user