API: Rename "TIX" interface to "Stock" (#2351)

This commit is contained in:
catloversg
2025-10-15 01:51:54 +07:00
committed by GitHub
parent 7ca364f49f
commit 30a572cfe6
36 changed files with 174 additions and 174 deletions
+3 -3
View File
@@ -18,13 +18,13 @@ import {
getStockMarketTixApiCost,
} from "../StockMarket/StockMarketCosts";
import type { Stock } from "../StockMarket/Stock";
import type { StockOrder, TIX } from "@nsdefs";
import type { StockOrder, Stock as StockAPI } from "@nsdefs";
import { setRemovedFunctions, type InternalAPI, type NetscriptContext } from "../Netscript/APIWrapper";
import { helpers } from "../Netscript/NetscriptHelpers";
import { StockMarketConstants } from "../StockMarket/data/Constants";
import { getEnumHelper } from "../utils/EnumHelper";
export function NetscriptStockMarket(): InternalAPI<TIX> {
export function NetscriptStockMarket(): InternalAPI<StockAPI> {
/** Checks if the player has TIX API access. Throws an error if the player does not */
const checkTixApiAccess = function (ctx: NetscriptContext): void {
if (!Player.hasTixApiAccess) {
@@ -41,7 +41,7 @@ export function NetscriptStockMarket(): InternalAPI<TIX> {
return stock;
};
const stockFunctions: InternalAPI<TIX> = {
const stockFunctions: InternalAPI<StockAPI> = {
getConstants: () => () => structuredClone(StockMarketConstants),
hasWseAccount: () => () => Player.hasWseAccount,
hasTixApiAccess: () => () => Player.hasTixApiAccess,