nbind <https://github.com/charto/nbind#using-with-typescript> has a somewhat shorter syntax than Embind and generates TypeScript definitions out of the box. You can also compile native binary Node.js addons with the exact same binding code, just by changing a build flag.
maanantai 21. marraskuuta 2016 14.45.59 UTC+2 matthias kirjoitti: > > The WebIdl to Typescript tool (https://github.com/hfmanson/idl) did not > work out of the box. You would need to extend it. > On the other hand I think Embind has more features/possibilities than > WebIdl. > > We tried to create a wrapper arround Embind to create embind bindings + > code to create typescript definitions. Unfortunately you can not output > this directly with a compiler. Instead you have to translate it into > JavaScript and run it for example in Node.js and this can output typescript > definitions. If you use emscripten::val it is even more complicated because > this can be anything. > > > Am Dienstag, 2. Juni 2015 16:27:45 UTC+2 schrieb matthias: >> >> With embind I am able to create some class library written in C++ (which >> is very nice). >> Is there a possibility that emscripten/embind also creates a typescript >> definition file (*.d.ts) file? >> Or are there any plans to support that? >> >> If it would be possible to create such a file you could use the >> emscripten/embind library in a typescript project and typescript would give >> you errors if you use the wrong names, parameters, types and so on. >> >> -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
