diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index 9c1acb9fd..b1f213753 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -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} diff --git a/input/bitburner.api.json b/input/bitburner.api.json index 4054c8d62..4148c530c 100644 --- a/input/bitburner.api.json +++ b/input/bitburner.api.json @@ -14221,7 +14221,7 @@ { "kind": "Interface", "canonicalReference": "bitburner!NS:interface", - "docComment": "/**\n * Collection of all functions passed to scripts\n *\n * @remarks\n *\n * Basic ns1 usage example:\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}
Basic ns2 usage example:\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}
\n *\n * @public\n */\n", + "docComment": "/**\n * Collection of all functions passed to scripts\n *\n * @remarks\n *\n * Basic ns1 usage example:\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}
Basic ns2 usage example:\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}
\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", diff --git a/markdown/bitburner.ns.md b/markdown/bitburner.ns.md index 33fe96149..ab908198d 100644 --- a/markdown/bitburner.ns.md +++ b/markdown/bitburner.ns.md @@ -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)
diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 0be8d685f..d463d68a7 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -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}