Skip to content

Commit 2cf5cca

Browse files
authored
Update adding-typescript.md
1 parent 5410da0 commit 2cf5cca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docusaurus/docs/adding-typescript.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To add TypeScript to a Create React App project, follow these steps:
1111

1212
1. Run `npm install --save typescript @types/react @types/react-dom @types/jest` (or `yarn add typescript @types/react @types/react-dom @types/jest`).
1313
2. Rename the `.js` files you want to convert: use `.tsx` if they use JSX or `.ts` if not (e.g. `git mv src/index.js src/index.tsx`).
14-
3. Create a [`tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) at the root directory with `{}` in it. Alternatively, rename `index.js` to `index.tsx`.
14+
3. Create a [`tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) at the root project directory with `{}` in it. Alternatively, rename `index.js` to `index.tsx`.
1515
4. Restart your development server (if applicable). This will set sensible defaults and the required values in your [`tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html).
1616

1717
Type errors will show up in the same console as the build one.

0 commit comments

Comments
 (0)