-
Notifications
You must be signed in to change notification settings - Fork 724
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
Generate Typescript #6145
Comments
Emscripten doesn't really generate typescript, but rather a separate typescript definitions file that helps call Emscripten-generated JS from TS projects. I'm not sure if you're thinking of compiling binaryen.js to TS or of implementing a Maybe the most useful thing to do here would be to create a TS definitions file for the binaryen.js API? |
I'm not thinking about the how yet, just about the what i.e. have a single source of truth and move it as close as possible upstream. Right now, as I understand it, we have:
In an ideal world, we'd have a single Binaryen.ts file, hosted in Binaryen repo, and that would produce a binaryen_js.js and a binaryen_js.d.ts files. Then any change in binaryen would only require updating that Binaryen.ts file. The role of the Binaryen.js repo would then shrink a bit to what it claims to be: a build bot. I don't yet know how to achieve that but if binaryen committers like the idea I'm happy to give it a try. |
What file is this? Do you mean
Are you referring to this binaryen.js repo? https://github.com/AssemblyScript/binaryen.js/ That repo is downstream from Binaryen and not maintained by us, so the base binaryen.js build from this repo should not depend on it. |
Yes
Oops typo. Just fixed it. |
Ok, IIUC, you're proposing to add TS definitions to the upstream binaryen.js build here in the Binaryen repo. If so, that sounds good to me! |
@tlively I just submitted the PR, so closing this. |
Hi,
thanks for the great work.
It seems that emscripten can now generate TypeScript ? See https://emscripten.org/search.html?q=typescript&check_keywords=yes&area=default ?
Would it make sense for binaryen to generate TypeScript instead of JavaScript ?
This would eliminate the risk of gaps between binaryen and binaryen.js.
Happy to try and make that happen if it makes sense (and I can get minimal support).
The text was updated successfully, but these errors were encountered: