Skip to content

Make typings more specific #100

Open
@GulgDev

Description

@GulgDev

Hello! Currently, binaryen.d.ts contains definitions that don't allow TypeScript compiler to properly narrow down ExpressionInfo. It would be nice to have more specific typings. I suggest the following changes:

  1. Change type of Id exports to match the corresponding enum value.
  2. Change the ExpressionInfo interface to a union type with the corresponding ids.

Should I make a PR or is this behaviour intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions