Skip to content

type Label seems to be wrong #8

@Glitterclaw

Description

@Glitterclaw

The Label type declared in type.ts

interface Label {
  [key: string | number]: {
      confidence: number;
      label: string;
  }
}

seems to be inconsistent with the label output I tried console.log-ed
{ confidence: number; label: string }
This produces annoying typescript errors when I try to use label.confidence which is actually a number but TS thinks it's {confidence: number; label: string}. Any fixes? I tried modifying type.ts but still gets the error.

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