From 694581cb52bd5bdf3be075285f2f3bfd10bfaa11 Mon Sep 17 00:00:00 2001 From: Kevin Sandow Date: Fri, 20 Jun 2025 20:19:58 +0200 Subject: [PATCH] MISC: Fix NetscriptDefinitions.d.ts formatting/escaping warnings (#2189) --- .../bitburner.codingcontractnameenumtype.md | 1 + markdown/bitburner.codingcontractobject.md | 1 + markdown/bitburner.codingcontractsignatures.md | 1 + markdown/bitburner.hacknetserverhashupgrade.md | 1 + src/ScriptEditor/NetscriptDefinitions.d.ts | 18 +++++++++++------- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/markdown/bitburner.codingcontractnameenumtype.md b/markdown/bitburner.codingcontractnameenumtype.md index 6c8805489..6ad23115a 100644 --- a/markdown/bitburner.codingcontractnameenumtype.md +++ b/markdown/bitburner.codingcontractnameenumtype.md @@ -4,6 +4,7 @@ ## CodingContractNameEnumType type + **Signature:** ```typescript diff --git a/markdown/bitburner.codingcontractobject.md b/markdown/bitburner.codingcontractobject.md index f512382dd..8c1cfb188 100644 --- a/markdown/bitburner.codingcontractobject.md +++ b/markdown/bitburner.codingcontractobject.md @@ -4,6 +4,7 @@ ## CodingContractObject type + **Signature:** ```typescript diff --git a/markdown/bitburner.codingcontractsignatures.md b/markdown/bitburner.codingcontractsignatures.md index 597f5b019..7b08b1b9d 100644 --- a/markdown/bitburner.codingcontractsignatures.md +++ b/markdown/bitburner.codingcontractsignatures.md @@ -4,6 +4,7 @@ ## CodingContractSignatures type + **Signature:** ```typescript diff --git a/markdown/bitburner.hacknetserverhashupgrade.md b/markdown/bitburner.hacknetserverhashupgrade.md index c02b9c09e..597f8f145 100644 --- a/markdown/bitburner.hacknetserverhashupgrade.md +++ b/markdown/bitburner.hacknetserverhashupgrade.md @@ -4,6 +4,7 @@ ## HacknetServerHashUpgrade type + **Signature:** ```typescript diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 5c9d91738..09e3cf818 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -90,7 +90,7 @@ interface ResetInfo { * BitNode options into account. * * For example, let's say you have SF 1.3, but you overrode the active level of SF1 and set it to level 1. In this - * case, this map contains this entry: Key: 1 => Value: 1. + * case, this map contains this entry: Key: 1 =\> Value: 1. * * If the active level of a source file is 0, that source file won't be included in the result. */ @@ -2514,7 +2514,7 @@ export interface Singularity { * Returns an array of source files. This function takes BitNode options into account. * * For example, let's say you have SF 1.3, but you overrode the active level of SF1 and set it to level 1. In this - * case, this function returns {"n":1,"lvl":1}. + * case, this function returns \{"n":1,"lvl":1\}. * * If the active level of a source file is 0, that source file won't be included in the result. * @@ -2851,6 +2851,7 @@ export interface CompanyPositionInfo { requiredSkills: Skills; } +/** @public */ type HacknetServerHashUpgrade = | "Sell for Money" | "Sell for Corporation Funds" @@ -4066,7 +4067,7 @@ export interface Format { * - "Infinity" and "-Infinity" are returned as "∞" and "-∞", respectively. * * - If you disable the suffix form in the settings page or the absolute value is greater than or equal to 1e33, this - * function will use the exponential form. This means that, if Math.abs(n) >= 1e33, the returned value is always in + * function will use the exponential form. This means that, if Math.abs(n) \>= 1e33, the returned value is always in * the exponential form, regardless of the setting. * * Note that the behaviors listed above are "undocumented", in the sense that we don't make any guarantee about @@ -4619,8 +4620,8 @@ export interface GoAnalysis { * The details are keyed by opponent name, in this structure: * *
-   * {
-   *   : {
+   * \{
+   *   : \{
    *     wins: number,
    *     losses: number,
    *     winStreak: number,
@@ -4628,8 +4629,8 @@ export interface GoAnalysis {
    *     favor: number,
    *     bonusPercent: number,
    *     bonusDescription: string,
-   *   }
-   * }
+   *   \}
+   * \}
    * 
* * @returns A dictionary of opponent stats keyed by opponent name. @@ -8703,6 +8704,7 @@ type FactionNameEnumType = { /** @public */ type FactionName = _ValueOf; +/** @public */ type CodingContractNameEnumType = { FindLargestPrimeFactor: "Find Largest Prime Factor"; SubarrayWithMaximumSum: "Subarray with Maximum Sum"; @@ -8738,6 +8740,7 @@ type CodingContractNameEnumType = { /** @public */ type CodingContractName = _ValueOf; +/** @public */ export type CodingContractSignatures = { "Find Largest Prime Factor": [number, number]; "Subarray with Maximum Sum": [number[], number]; @@ -8770,6 +8773,7 @@ export type CodingContractSignatures = { "Total Number of Primes": [number[], number]; }; +/** @public */ export type CodingContractObject = { [T in keyof CodingContractSignatures]: { type: T;