Validate city name coming from netscript

This commit is contained in:
Olivier Gagnon
2022-03-30 11:34:03 -04:00
parent ab93cfa887
commit 98ae97afea
5 changed files with 70 additions and 53 deletions

View File

@@ -1,3 +1,4 @@
import { CityName } from "src/Locations/data/CityNames";
import { BaseServer } from "../Server/BaseServer";
export interface INetscriptHelper {
@@ -5,6 +6,7 @@ export interface INetscriptHelper {
makeRuntimeErrorMsg(functionName: string, message: string): void;
string(funcName: string, argName: string, v: unknown): string;
number(funcName: string, argName: string, v: unknown): number;
city(funcName: string, argName: string, v: unknown): CityName;
boolean(v: unknown): boolean;
getServer(ip: any, fn: any): BaseServer;
checkSingularityAccess(func: string): void;