MISC: Remove mention of Netscript 1.0/2.0/JS in NetscriptDefinitions.d.ts (#2150)

This commit is contained in:
catloversg
2025-05-24 04:04:34 +07:00
committed by GitHub
parent 4e5044124c
commit 5a052e902c
3 changed files with 0 additions and 19 deletions

View File

@@ -28,5 +28,3 @@ RAM cost: 0 GB
Get a handle to a Netscript Port.
WARNING: Port Handles only work in NetscriptJS (Netscript 2.0). They will not work in Netscript 1.0.

View File

@@ -32,10 +32,6 @@ RAM cost: 0 GB
Retrieves data from a URL and downloads it to a file on the specified server. The data can only be downloaded to a script (.js, .jsx, .ts, .tsx) or a text file (.txt, .json). If the file already exists, it will be overwritten by this command. Note that it will not be possible to download data from many websites because they do not allow cross-origin resource sharing (CORS).
IMPORTANT: This is an asynchronous function that returns a Promise. The Promises resolved value will be a boolean indicating whether or not the data was successfully retrieved from the URL. Because the function is async and returns a Promise, it is recommended you use wget in NetscriptJS (Netscript 2.0).
In NetscriptJS, you must preface any call to wget with the await keyword (like you would [hack](./bitburner.ns.hack.md) or [sleep](./bitburner.ns.sleep.md)<!-- -->). wget will still work in Netscript 1.0, but the function's execution will not be synchronous (i.e. it may not execute when you expect/want it to). Furthermore, since Promises are not supported in ES5, you will not be able to process the returned value of wget in Netscript 1.0.
## Example

View File

@@ -7768,8 +7768,6 @@ export interface NS {
*
* Get a handle to a Netscript Port.
*
* WARNING: Port Handles only work in NetscriptJS (Netscript 2.0). They will not work in Netscript 1.0.
*
* @param portNumber - Port number. Must be a positive integer.
*/
getPortHandle(portNumber: number): NetscriptPort;
@@ -8067,17 +8065,6 @@ export interface NS {
* Note that it will not be possible to download data from many websites because they
* do not allow cross-origin resource sharing (CORS).
*
* IMPORTANT: This is an asynchronous function that returns a Promise.
* The Promises resolved value will be a boolean indicating whether or not the data was
* successfully retrieved from the URL. Because the function is async and returns a Promise,
* it is recommended you use wget in NetscriptJS (Netscript 2.0).
*
* In NetscriptJS, you must preface any call to wget with the await keyword (like you would {@link NS.hack | hack} or {@link NS.sleep | sleep}).
* wget will still work in Netscript 1.0, but the function's execution will not be synchronous
* (i.e. it may not execute when you expect/want it to).
* Furthermore, since Promises are not supported in ES5,
* you will not be able to process the returned value of wget in Netscript 1.0.
*
* @example
* ```js
* await ns.wget("https://raw.githubusercontent.com/bitburner-official/bitburner-src/master/README.md", "game_readme.txt");