Add type fix for flags

This commit is contained in:
Snarling 2022-08-24 19:09:18 -04:00
parent bba9317ef6
commit 650db2dee7
2 changed files with 2 additions and 2 deletions

@ -4,7 +4,7 @@ import { ScriptArg } from "../Netscript/ScriptArg";
import { NetscriptContext } from "../Netscript/APIWrapper";
type FlagType = StringConstructor | NumberConstructor | BooleanConstructor | StringConstructor[];
type FlagsRet = { [key: string]: ScriptArg };
type FlagsRet = { [key: string]: ScriptArg | string[] };
export function Flags(ctx: NetscriptContext | string[]): (data: unknown) => FlagsRet {
const vargs = Array.isArray(ctx) ? ctx : ctx.workerScript.args;
return (schema: unknown): FlagsRet => {

@ -6531,7 +6531,7 @@ export interface NS {
* // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true}
* ```
*/
flags(schema: [string, string | number | boolean | string[]][]): { [key: string]: ScriptArg };
flags(schema: [string, string | number | boolean | string[]][]): { [key: string]: ScriptArg | string[] };
/**
* Share your computer with your factions.