-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add TS typings #78
Comments
I'm interested in the issue, can I be assigned @SamWilsn ? Also, please correct me if I got it wrong, the issue is due to the My question is currently the js package is generated automatically with |
Of course!
Correct!
It's a bit hairy (or at least it was the last time I looked.) I've done something similar over here, but it's a very manual process. The wasm-bindgen reference has a section on it. This Stack Overflow answer has some options for doing it automatically, but I haven't investigated them much. ts-rs in particular seems weird in that it generates the bindings during |
Thanks for your guides, they're very helpful! I've actually successfully implemented tsify and generated the intended .d.ts file. But this would involves modifications on eipw-lint, so I think manually adding the types generated by tsify would be a better approach. I've forked the repo and you can see my latest process here. However, I failed to bind the types customarily defined with the Can you provide some help to break the blocks I met? And you can find all my codes here ( the master branch is where I want to manually add types, tsify/ts-rs branch is where I implemented tsify/ts-rs ). Thanks! |
Oh wow! You've gone way further down this road than I ever have.
I'm not opposed to modifications. How extensive are they? I tried to look through your diff, but I think you reformatted the code, so it's a bit hard to follow.
Those might be easier to just do by hand. |
This is the tricky part I met. I can't just code as Also after changing the type declaration of lint and format, there would be type mismatch issues in test. Since OptsJS and SnippetJS are generated by wasm_bindgen, they didn't implement Deserialize. So I can't use How do you think of current codes. ? Thanks 🙏 . |
Pretty simple. Add .d.ts files for
eipw-lint-js
.The text was updated successfully, but these errors were encountered: