Matthias - Thanks, I figured it would be a bit difficult but given that it 
ends up in JavaScript I figured there maybe a way to extend the compiler a 
bit more. I tried a few js -> d.ts generators but they all seemed to fail.

Juha - I'll give that a shot. Is nbind replacing embind or is it completely 
separate?

On Tuesday, November 22, 2016 at 3:36:25 AM UTC-8, Juha Järvi wrote:

> 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.

Reply via email to