TSIDL is a command-line tool that uses interface definitions described in TypeScript to generate automatic marshaling code between the Chakra JavaScript engine API and C++.
Install globally using npm:
npm install tsidl -g
To generate marshaling code from a definition file:
$ tsidl
Sometimes it looks like this: