charto / nbind

:sparkles: Magical headers that make your C++ library accessible from JavaScript :rocket:
MIT License
1.98k stars 119 forks source link

Move @types/node in devDependencies #79

Closed orta closed 7 years ago

orta commented 7 years ago

Re: #7

I ran tests before, and after - however, I do not know if this is considered a deployment dependency which I can't test too easily.

jjrv commented 7 years ago

The problem is that arguments of type nbind::Buffer in C++ become number[] | ArrayBuffer | DataView | Uint8Array | Buffer in TypeScript definitions and Buffer is undefined without @types/node installed.

I added a shim declaring Buffer as Uint8Array since it inherits from that, hopefully not breaking anything else.

orta commented 7 years ago

Thanks @jjrv ❤️

jjrv commented 7 years ago

Thank you for the PR! I'll do a new release today.