samualtnorman / hackmud-script-manager

Script manager for game hackmud, with minification, TypeScript support, and player script type definition generation.
https://www.npmjs.com/package/hackmud-script-manager
MIT License
11 stars 5 forks source link

k3y property not allowed in market.browse #193

Open DakvasBuilds opened 6 months ago

DakvasBuilds commented 6 months ago

When I attempt to browse the market via a script and pass in the "k3y" parameter like you can in market.browse at the CLI, HSE displays this as an error on the browse method.

image

Error message:

No overload matches this call.
  Overload 1 of 3, '(args: { seller: string; listed_before: number; listed_after: number; cost: string | number; } & Omit<UpgradeCore, "rarity"> & { [x: string]: string | number | boolean; rarity: "`0noob`" | ... 4 more ... | "`531337`"; }): ScriptFailure | { ...; }[]', gave the following error.
    Argument of type '{ k3y: string; }' is not assignable to parameter of type '{ seller: string; listed_before: number; listed_after: number; cost: string | number; } & Omit<UpgradeCore, "rarity"> & { [x: string]: string | number | boolean; rarity: "`0noob`" | ... 4 more ... | "`531337`"; }'.
      Type '{ k3y: string; }' is missing the following properties from type '{ seller: string; listed_before: number; listed_after: number; cost: string | number; }': seller, listed_before, listed_after, cost
  Overload 2 of 3, '(args: { i: string; }): ScriptFailure | { i: string; seller: string; cost: number; count: number; description: string; upgrade: Upgrade; no_notify: boolean; }', gave the following error.
    Object literal may only specify known properties, and 'k3y' does not exist in type '{ i: string; }'.
  Overload 3 of 3, '(args: { i: string[]; }): ScriptFailure | { i: string[]; seller: string; cost: number; count: number; description: string; upgrade: Upgrade; no_notify: boolean; }[]', gave the following error.
    Object literal may only specify known properties, and 'k3y' does not exist in type '{ i: string[]; }'.ts(2769)

Running script with this parameter works fine despite the error, indicating "k3y" is valid parameter for market.browse.

image

image

samualtnorman commented 6 months ago

fixed by #192