Skip to content

Narrow type of some lists in the TypeScript typings file #43

Open

Description

@MeGaGiGaGon

Issue type:

  • ➕ Feature request

Short description:

Some functions like inventory are typed to return any[]. While not technically wrong, it could have a more precise typing of ValueItemstack[], which helps with autocomplete.

There are also some functions like nbtWithIntList that take in an any[], though I'm not sure what the type for that would be, or if it would be helpful thanks to #31 still being open.

There are also some functions that could maybe use generics to get a more complete typing, ie operatorMap, though I am not familiar enough with TypeScript to give a concrete suggestion

Activity

  1. rubensworks commented on May 28, 2025

    @rubensworks
    Member

    Thanks for the suggestion!

  2. moved this from Options to Accepted (To Do) in Featureson May 29, 2025
  3. moved this from Accepted (To Do) to In Progress in Featureson May 29, 2025
  4. moved this from In Progress to Accepted (To Do) in Featureson May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Accepted (To Do)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions