Skip to content

Commit c8c3e48

Browse files
authored
Update adding-typescript.md
1 parent 4c7c3c5 commit c8c3e48

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

docusaurus/docs/adding-typescript.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ title: Adding TypeScript
1010
To start a new Create React App project with [TypeScript](https://www.typescriptlang.org/), you can run:
1111

1212
```bash
13-
$ npx create-react-app my-app --typescript
14-
$ # or
15-
$ yarn create react-app my-app --typescript
13+
npx create-react-app my-app --typescript
14+
15+
# or
16+
17+
yarn create react-app my-app --typescript
1618
```
1719

1820
To add [TypeScript](https://www.typescriptlang.org/) to a Create React App project, first install it:
1921

2022
```bash
21-
$ npm install --save typescript @types/node @types/react @types/react-dom @types/jest
22-
$ # or
23-
$ yarn add typescript @types/node @types/react @types/react-dom @types/jest
23+
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
24+
25+
# or
26+
27+
yarn add typescript @types/node @types/react @types/react-dom @types/jest
2428
```
2529

2630
Next, rename any file to be a TypeScript file (e.g. `src/index.js` to `src/index.tsx`) and **restart your development server**!

0 commit comments

Comments
 (0)