diff --git a/docusaurus/docs/adding-typescript.md b/docusaurus/docs/adding-typescript.md index 7d6a61ed..d67cee32 100644 --- a/docusaurus/docs/adding-typescript.md +++ b/docusaurus/docs/adding-typescript.md @@ -10,17 +10,21 @@ title: Adding TypeScript To start a new Create React App project with [TypeScript](https://www.typescriptlang.org/), you can run: ```bash -$ npx create-react-app my-app --typescript -$ # or -$ yarn create react-app my-app --typescript +npx create-react-app my-app --typescript + +# or + +yarn create react-app my-app --typescript ``` To add [TypeScript](https://www.typescriptlang.org/) to a Create React App project, first install it: ```bash -$ npm install --save typescript @types/node @types/react @types/react-dom @types/jest -$ # or -$ yarn add typescript @types/node @types/react @types/react-dom @types/jest +npm install --save typescript @types/node @types/react @types/react-dom @types/jest + +# or + +yarn add 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 **restart your development server**!