Skip to content

Make typings more specific #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
GulgDev opened this issue Mar 31, 2025 · 0 comments
Open

Make typings more specific #100

GulgDev opened this issue Mar 31, 2025 · 0 comments

Comments

@GulgDev
Copy link

GulgDev commented Mar 31, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant