Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 326 Bytes

typescript.md

File metadata and controls

27 lines (20 loc) · 326 Bytes

Add TypeScript

# Install TypeScript
$ npm i -D typescript ts-node

# Install types
$ npm i -D @types/node

Initialize config file

$ npx tsc --init

Compile project

$ npm run tsc

React with Typescript

# Install types for React and ReactDOM
$ npm i -D @types/react @types/react-dom