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
Better types for opcodes #1966
Comments
OPS is pretty straightforward, (just as Admittedly, when I migrated this library to TypeScript I was a TS beginner, and only feel like I now have a semi-intermediate grasp on it... PRs are welcome, but I think this won't land until the next major version whenever that is. |
How about using enum as bitcoin core does? |
Made PR for this #2028. |
ops.ts exports the list of opcodes as:
That's not a very safe type, as it permits access with any string key. It also doesn't work with code completion.
Can this type be made more specific? It would technically be a breaking change for anyone using this in an unsafe manner, but I believe it's worth it. I'm happy to work on this.
The text was updated successfully, but these errors were encountered: