This commit is contained in:
Olivier Gagnon 2021-12-16 15:28:53 -05:00
parent e16fba2418
commit 33e918fc49
4 changed files with 13 additions and 7 deletions

6
dist/bitburner.d.ts vendored

@ -2138,9 +2138,11 @@ export declare interface NodeStats {
* ```ts
* export async function main(ns) {
* // Basic ns functions can be accessed on the ns object
* await ns.getHostname();
* ns.getHostname();
* // Some related functions are gathered under a sub-property of the ns object
* await ns.stock.getPrice();
* ns.stock.getPrice();
* // Some functions need to be await ed
* await ns.hack('n00dles');
* }
* ```
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}

@ -14221,7 +14221,7 @@
{
"kind": "Interface",
"canonicalReference": "bitburner!NS:interface",
"docComment": "/**\n * Collection of all functions passed to scripts\n *\n * @remarks\n *\n * <b>Basic ns1 usage example:</b>\n * ```ts\n * // Basic ns functions can be used directly\n * getHostname();\n * // Some related functions are gathered within a common namespace\n * stock.getPrice();\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html | ns1 in-game docs} <hr> <b>Basic ns2 usage example:</b>\n * ```ts\n * export async function main(ns) {\n * // Basic ns functions can be accessed on the ns object\n * await ns.getHostname();\n * // Some related functions are gathered under a sub-property of the ns object\n * await ns.stock.getPrice();\n * }\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html | ns2 in-game docs} <hr>\n *\n * @public\n */\n",
"docComment": "/**\n * Collection of all functions passed to scripts\n *\n * @remarks\n *\n * <b>Basic ns1 usage example:</b>\n * ```ts\n * // Basic ns functions can be used directly\n * getHostname();\n * // Some related functions are gathered within a common namespace\n * stock.getPrice();\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html | ns1 in-game docs} <hr> <b>Basic ns2 usage example:</b>\n * ```ts\n * export async function main(ns) {\n * // Basic ns functions can be accessed on the ns object\n * ns.getHostname();\n * // Some related functions are gathered under a sub-property of the ns object\n * ns.stock.getPrice();\n * // Some functions need to be await ed\n * await ns.hack('n00dles');\n * }\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html | ns2 in-game docs} <hr>\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",

@ -28,9 +28,11 @@ export interface NS extends Singularity
```ts
export async function main(ns) {
// Basic ns functions can be accessed on the ns object
await ns.getHostname();
ns.getHostname();
// Some related functions are gathered under a sub-property of the ns object
await ns.stock.getPrice();
ns.stock.getPrice();
// Some functions need to be await ed
await ns.hack('n00dles');
}
```
[ns2 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html) <hr>

@ -3740,9 +3740,11 @@ interface Stanek {
* ```ts
* export async function main(ns) {
* // Basic ns functions can be accessed on the ns object
* await ns.getHostname();
* ns.getHostname();
* // Some related functions are gathered under a sub-property of the ns object
* await ns.stock.getPrice();
* ns.stock.getPrice();
* // Some functions need to be await ed
* await ns.hack('n00dles');
* }
* ```
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}