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
I would love to get autocomplete on the exposed wasm-git module.
Not sure how to achieve it best though. I thought perhaps wasm-git npm package exposes one WasmGit TypeScript type (not sure on name) and then in code you can do:
I think this is beyond the purpose and goals of wasm-git itself, but for sure would be nice as a separate project building on wasm-git. The purpose of wasm-git is first of all to be a port of libgit2 to WebAssembly using Emscripten, and not to introduce any API's on top.
This is also discussed earlier in this issue here: #30 (comment)
Makes sense. I will just expose types for functions I use for wasm-git, if it becomes an issue I might make a separate repo with types for libgit2 commands.
I would love to get autocomplete on the exposed wasm-git module.
Not sure how to achieve it best though. I thought perhaps
wasm-git
npm package exposes oneWasmGit
TypeScript type (not sure on name) and then in code you can do:This way
libgit
is fully typed at this point. Can typelibgit.
and get completion forcallMain
. Get completions forcallMain
commands too.To achieve this I guess we can parse C code functions that are defined in
commands
array and create type definitions? Or maybe there's a nicer way.The text was updated successfully, but these errors were encountered: