Skip to content

Commit f51a3d4

Browse files
authored
Update nodejs.md
1 parent 4e5546a commit f51a3d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/quick/nodejs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +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, making sure you have `compilerOptions.module:commonjs` in your tsconfig.json (`npx tsc --init --module commonjs`)
9+
1. Init a `tsconfig.json` for TypeScript options with a few key options in your tsconfig.json (`npx tsc --init --esModuleInterop --resolveJsonModule --lib es6,dom --module commonjs`)
1010

1111
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!
1212

0 commit comments

Comments
 (0)