Skip to content

Commit 89f7608

Browse files
committed
Add readme to 'ts-and-js' sample folder.
1 parent f0bc0f2 commit 89f7608

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

js-and-ts/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# TypeScript Sample: Mixing TypeScript and JavaScript
2+
3+
## Overview
4+
5+
A sample of how to use the `allowJS` option to use both JavaScript and TypeScript together.
6+
A simple text formatter is provided, written in JavaScript. This formatter is then used
7+
within a TypeScript class to format a computation.
8+
9+
To run this sample, you must have `node` installed. You can also use `ts-node` to run this directly
10+
without a compilation from TypeScript to JavaScript.
11+
12+
## Running
13+
14+
```bash
15+
$ tsc robot.ts`
16+
$ node robot.js`
17+
```

0 commit comments

Comments
 (0)