You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks cool. I helped write https://www.npmjs.com/package/ts2fable which generated F# Fable code based on the TypeScript. It gets pretty complicated. The approach I took was:
manually create the binding to the typescript.ts api
use the TypeScript API to read in the TypeScript definitions and generate bindings
After some work, I was able to generate binding for the TypeScript API itself and then we kept adding support for more and more language features and libraries.
It is a different approach that could work. Curious what you think. Another benefit is that you could also generate TypeScript code (and therefore JavaScript too) from Rust if you had access to its API.
alexcrichton
added a commit
to alexcrichton/wasm-bindgen
that referenced
this issue
Dec 4, 2019
wasm-bindgen-typescript just landed #228.
It will need to cover all the different constructions that TypeScript supports. In particular, this fa8961e#diff-7837f9f1900f30ff96bd2bbfe07a3f4eR30
The json format returned by api-extractor (the one that needs to be parsed) is defined in https://github.com/Microsoft/web-build-tools/blob/master/apps/api-extractor/src/api/api-json.schema.json
You can see a lot of examples of how this is accomplished with serde in this file fa8961e#diff-7837f9f1900f30ff96bd2bbfe07a3f4e
Feel free to ping me on twitter, IRC, email (spastorino everywhere) and I can provide more help to tackle this.
The text was updated successfully, but these errors were encountered: