mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-27 16:31:31 +01:00
doc
This commit is contained in:
parent
e16fba2418
commit
33e918fc49
6
dist/bitburner.d.ts
vendored
6
dist/bitburner.d.ts
vendored
@ -2138,9 +2138,11 @@ export declare interface NodeStats {
|
|||||||
* ```ts
|
* ```ts
|
||||||
* export async function main(ns) {
|
* export async function main(ns) {
|
||||||
* // Basic ns functions can be accessed on the ns object
|
* // 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
|
* // 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}
|
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}
|
||||||
|
@ -14221,7 +14221,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "Interface",
|
"kind": "Interface",
|
||||||
"canonicalReference": "bitburner!NS: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": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
|
@ -28,9 +28,11 @@ export interface NS extends Singularity
|
|||||||
```ts
|
```ts
|
||||||
export async function main(ns) {
|
export async function main(ns) {
|
||||||
// Basic ns functions can be accessed on the ns object
|
// 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
|
// 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>
|
[ns2 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html) <hr>
|
||||||
|
6
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
6
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -3740,9 +3740,11 @@ interface Stanek {
|
|||||||
* ```ts
|
* ```ts
|
||||||
* export async function main(ns) {
|
* export async function main(ns) {
|
||||||
* // Basic ns functions can be accessed on the ns object
|
* // 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
|
* // 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}
|
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}
|
||||||
|
Loading…
Reference in New Issue
Block a user