A sample of how to use the allowJS
option to use both JavaScript and TypeScript together.
A simple text formatter is provided, written in JavaScript. This formatter is then used
within a TypeScript class to format a computation.
To run this sample, you must have node
installed. You can also use ts-node
to run this directly
without a compilation from TypeScript to JavaScript.
$ tsc robot.ts`
$ node robot.js`