Skip to content

Incorrect typing on HintStatusJSONMessagePart.hint_status #9

Closed

Description

@DrAwesome4333

I have read the above disclaimer and I am submitting a new bug report and have verified no other duplicate reports exist in the Issues or Discussions tabs.

  • Confirm

Describe the Issue

The HintStatusJSONMessagePart.hint_status has a compiled type of

{
    readonly unspecified: 0;
    readonly noPriority: 10;
    readonly avoid: 20;
    readonly priority: 30;
    readonly found: 40;
}

instead of one of the numerical values it contains.
Image

Reproduction Steps

This can reproduced by trying to use the value in a type aware manner. In this case the error is raised because an object type cannot be used as an index.

Image

Expected Behavior

I would expect to be able to use the value as an index, as it is a number at run-time.

Image

Library Version

56b7182 current (airbreather/main)

Environment / Runtime

VS-Codium, typescript 5.7

Project Repository

No response

Additional Notes, Screenshots, or Files

This seems to be due to converting the previously used enum on my fork to a constant object without changing the typing definition for the hint_status field, making the previous enum type refer to the constant object.

Activity

  1. airbreather commented on Oct 22, 2026

    @airbreather
    Owner

    Resolved with #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions