diff --git a/docusaurus/docs/adding-typescript.md b/docusaurus/docs/adding-typescript.md index d94bccc4920..06224c3b294 100644 --- a/docusaurus/docs/adding-typescript.md +++ b/docusaurus/docs/adding-typescript.md @@ -28,13 +28,13 @@ yarn create react-app my-app --template typescript To add [TypeScript](https://www.typescriptlang.org/) to an existing Create React App project, first install it: ```sh -npm install --save typescript @types/node @types/react @types/react-dom @types/jest +npm install --save-dev typescript @types/node @types/react @types/react-dom @types/jest ``` or ```sh -yarn add typescript @types/node @types/react @types/react-dom @types/jest +yarn add -D typescript @types/node @types/react @types/react-dom @types/jest ``` Next, rename any file to be a TypeScript file (e.g. `src/index.js` to `src/index.tsx`) and create tsconfig.json if it's not in the root of your project [`tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html).