Skip to content

Commit c94beb7

Browse files
authored
Update nodejs.md
1 parent 5e6f635 commit c94beb7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/quick/nodejs.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ TypeScript has had *first class* support for Node.js since inception. Here's how
66
1. Setup a Node.js project `package.json`. Quick one : `npm init -y`
77
1. Add TypeScript (`npm install typescript --save-dev`)
88
1. Add `node.d.ts` (`npm install @types/node --save-dev`)
9-
1. Init a `tsconfig.json` for TypeScript options (`npx tsc --init`)
10-
1. Make sure you have `compilerOptions.module:commonjs` in your tsconfig.json
9+
1. Init a `tsconfig.json` for TypeScript options, making sure you have `compilerOptions.module:commonjs` in your tsconfig.json (`npx tsc --init --module commonjs`)
1110

1211
That's it! Fire up your IDE (e.g. `alm -o`) and play around. Now you can use all the built in node modules (e.g. `import fs = require('fs');`) with all the safety and developer ergonomics of TypeScript!
1312

0 commit comments

Comments
 (0)