Repository navigation
Replies: 2 comments 1 reply
|
It would be nice to have better TS output, but I see two potential issues with above approach. 1) We'd need to support Another potential option (that may not need to live in emscripten) is you could extract a comment from the c++ source either specifically for that binding or from the original function and then have a script to inject it into the EMSCRIPTEN_BINDINGS(my_module) {
/**
* A Completely Random Function.
* @param a - Start value
* @param b - End value
* @param c - Another number
* @returns The sum
*/
function("randomFunc(a,b,c)", &randomFunction);
} |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Just polling here before trying to extend Emscripten. I maintain a WASM NPM package, and I would love to extend the type documentation with JSDoc. Currently, the interface
.d.ts.exports very nicely, but to have the full interface hosted with something like typedoc.org (similar to sphinx-doc.org for cpp), I would need to also embed documentation into the.function()interface.Has this been considered before? I didn't see any discussion about it.
I was thinking something like.
producing
I think it would help produce nicely self-documented WASM code.
All reactions