-
Notifications
You must be signed in to change notification settings - Fork 63
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
Provide Typescript type declarations for jco
API
#253
Comments
Happy to contribute to some work here, but would like feedback from project maintainers on what direction is preferable before I dive too far in. |
jco
APIjco
API
Thanks for bringing this up, we should definitely resolve it! The file in So it should be a relatively PR to fix, and we shouldn't need to maintain much more than just those reexport declarations. If you're able to look into this further that would be a huge help. |
Almost done with this, but I'm encountering an error that I've encountered in my own projects as well. The file export { tools, tools as 'local:wasm-tools/tools' } This is valid javascript, but (seemingly) not valid typescript. Ts accepts In my own projects I've been handling this by Created a bug in the ts repo to track this: microsoft/TypeScript#56375 |
Ahh turns out this is already a known ts bug, but the fix for it seems to have stalled out: microsoft/TypeScript#40594 |
Yes, for TypeScript definitions, we just have to omit these export names for now. |
I am attempting to use
jco
as a library from a Typescript project. The following import throws an error:Throws:
This appears to be because there are no
.d.ts
files innode_modules/@bytecodealliance/jco
, so ts doesn't recognize the package. I can add my own declaration file to get unblocked, but this seems like a thing that will impact multiple users going forward.From some quick research it seems like this could be handled in a few ways:
jco
to a typescript project, runtsc
as part of the build to generate the.d.ts
bindingsThe first option looks like the best, but would be fairly disruptive. The other options might be quicker.
The text was updated successfully, but these errors were encountered: