Created
October 28, 2021 22:03
-
-
Save samuraijane/b7a5bbf4272637357da860960506bf82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In order to run TypeScript code in a shell from the command line, you need NPM's `ts-node` package. | |
`npm install -g @[email protected]` | |
`npm install -g @[email protected]` | |
If you see a warning or an error that TypeScript has an unmet peer dependency for `@type/node`, then install it directly. | |
`npm install -g @types/node` | |
Initiate a TypeScript Node Shell | |
`ts-node` | |
At the prompt, enter code that TypeScript recognizes | |
`let name: string = 'Anna'` | |
If you do not see any errors, then the TypeScript Node shell is working correctly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment