updated appearach of example sections based on alainbryden suggestion

This commit is contained in:
Jordan Turner 2021-12-15 21:47:18 -07:00
parent 632e1f70f3
commit 3926913790
4 changed files with 28 additions and 8 deletions

11
dist/bitburner.d.ts vendored

@ -2127,17 +2127,24 @@ export declare interface NodeStats {
* @remarks
* <b>Basic ns1 usage example:</b>
* ```ts
* property.methodName;
* // Basic ns functions can be used directly
* methodName();
* // Some related functions are gathered within a common namespace
* property.methodName()
* ```
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs}
* <hr>
* <b>Basic ns2 usage example:</b>
* ```ts
* export async function main(ns) {
* ns.property.methodName;
* // Basic ns functions can be accessed on the ns object
* ns.methodName;
* // Some related functions are gathered under a sub-property of the ns object
* ns.property.methodName
* }
* ```
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}
* <hr>
*/
export declare interface NS extends Singularity {
/**

@ -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 * property.methodName;\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 * ns.property.methodName;\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 * <b>Basic ns1 usage example:</b>\n * ```ts\n * // Basic ns functions can be used directly\n * methodName();\n * // Some related functions are gathered within a common namespace\n * property.methodName()\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.methodName;\n * // Some related functions are gathered under a sub-property of the ns object\n * ns.property.methodName\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",

@ -18,16 +18,22 @@ export interface NS extends Singularity
<b>Basic ns1 usage example:</b>
```ts
property.methodName;
// Basic ns functions can be used directly
methodName();
// Some related functions are gathered within a common namespace
property.methodName()
```
[ns1 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html) <hr> <b>Basic ns2 usage example:</b>
```ts
export async function main(ns) {
ns.property.methodName;
// Basic ns functions can be accessed on the ns object
ns.methodName;
// Some related functions are gathered under a sub-property of the ns object
ns.property.methodName
}
```
[ns2 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html)
[ns2 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html) <hr>
## Properties

@ -3710,17 +3710,24 @@ interface Stanek {
* @remarks
* <b>Basic ns1 usage example:</b>
* ```ts
* property.methodName;
* // Basic ns functions can be used directly
* methodName();
* // Some related functions are gathered within a common namespace
* property.methodName()
* ```
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs}
* <hr>
* <b>Basic ns2 usage example:</b>
* ```ts
* export async function main(ns) {
* ns.property.methodName;
* // Basic ns functions can be accessed on the ns object
* ns.methodName;
* // Some related functions are gathered under a sub-property of the ns object
* ns.property.methodName
* }
* ```
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}
* <hr>
*/
export interface NS extends Singularity {
/**