Skip to content

split code blocks in Adding TypeScript page of Create React App documentation for easier copying and pasting #10553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docusaurus/docs/adding-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ title: Adding TypeScript

## Installation

To start a new Create React App project with [TypeScript](https://www.typescriptlang.org/), you can run:
To start a new Create React App project with [TypeScript](https://www.typescriptlang.org/), you can run

```sh
npx create-react-app my-app --template typescript

# or

```
or
```sh
yarn create react-app my-app --template typescript
```

> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` or `yarn global remove create-react-app` to ensure that `npx` always uses the latest version.
>
> Global installs of `create-react-app` are no longer supported.

To add [TypeScript](https://www.typescriptlang.org/) to an existing Create React App project, first install it:
To add [TypeScript](https://www.typescriptlang.org/) to an existing Create React App project, first install it with

```sh
npm install --save typescript @types/node @types/react @types/react-dom @types/jest

# or

```
or
```sh
yarn add typescript @types/node @types/react @types/react-dom @types/jest
```

Expand Down