From 632e1f70f3c5b3e44f904af3c2d0dfb72acad198 Mon Sep 17 00:00:00 2001 From: Jordan Turner Date: Wed, 15 Dec 2021 10:25:54 -0700 Subject: [PATCH] added rs to backricks to color code syntax --- dist/bitburner.d.ts | 8 +++++--- input/bitburner.api.json | 2 +- markdown/bitburner.ns.md | 8 +++++--- src/ScriptEditor/NetscriptDefinitions.d.ts | 8 +++++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index f8a461da4..32afd2832 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -2126,14 +2126,16 @@ export declare interface NodeStats { * @public * @remarks * Basic ns1 usage example: - * ``` + * ```ts * property.methodName; * ``` * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs} *
* Basic ns2 usage example: - * ``` - * ns.property.methodName; + * ```ts + * export async function main(ns) { + * ns.property.methodName; + * } * ``` * {@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 7625926d8..416ce0dcb 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 * ```\n * property.methodName;\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html | ns1 in-game docs}
Basic ns2 usage example:\n * ```\n * ns.property.methodName;\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 * property.methodName;\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 * 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", "excerptTokens": [ { "kind": "Content", diff --git a/markdown/bitburner.ns.md b/markdown/bitburner.ns.md index e24824de4..7e1a2fdae 100644 --- a/markdown/bitburner.ns.md +++ b/markdown/bitburner.ns.md @@ -17,13 +17,15 @@ export interface NS extends Singularity Basic ns1 usage example: -``` +```ts property.methodName; ``` [ns1 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html)
Basic ns2 usage example: -``` -ns.property.methodName; +```ts +export async function main(ns) { + ns.property.methodName; +} ``` [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 e5aff2a9d..c6ca3bab6 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -3709,14 +3709,16 @@ interface Stanek { * @public * @remarks * Basic ns1 usage example: - * ``` + * ```ts * property.methodName; * ``` * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs} *
* Basic ns2 usage example: - * ``` - * ns.property.methodName; + * ```ts + * export async function main(ns) { + * ns.property.methodName; + * } * ``` * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs} */