Skip to content

Commit 001cc68

Browse files
committed
Minor tweaks
1 parent 5c53405 commit 001cc68

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ Cheatsheets for experienced Vue developers getting started with TypeScript
1818
npm install --global @vue/cli
1919

2020
# 2. Create a new project, then choose the "Manually select features" option
21-
vue create my-project-name
21+
vue create <my-project-name>
2222
```
2323

24-
2. [Vite](https://github.com/vitejs/vite) is a new build tool by Evan You. Which current only works with Vue 3.x but works with TypeScript out-of-the-box.
24+
2. [Vite](https://github.com/vitejs/vite) is a new build tool by Evan You. It currently only works with Vue 3.x but supports TypeScript out-of-the-box.
2525

26-
> Current in beta. Don't use in production.
26+
> Currently in beta. Do not use in production.
2727
2828
```bash
2929
npm init vite-app <project-name>
@@ -36,7 +36,7 @@ Cheatsheets for experienced Vue developers getting started with TypeScript
3636

3737
## Recommended `ts.config` setup
3838

39-
note: `strict:true` stricter inference for data properties on `this`. If you do not use it, `this` will always be treated as `any`
39+
>note: `strict:true` stricter inference for data properties on `this`. If you do not use it, `this` will always be treated as `any`
4040
```json
4141
// tsconfig.json
4242
{
@@ -51,19 +51,21 @@ note: `strict:true` stricter inference for data properties on `this`. If you do
5151

5252
## Usage in `.vue` files
5353
Add `lang="ts"` to the script tag to declare TS as the `lang` used.
54-
```vue
54+
```js
5555
<script lang="ts">
5656
...
5757
</script>
5858
```
5959

6060
In Vue 2.x you need to define components with `Vue.component` or `Vue.extend`:
6161

62-
```vue
62+
```js
6363
<script lang="ts">
6464
import Vue from "vue";
6565

6666
export default Vue.extend({
67+
68+
// type inference enabled
6769
name: "HelloWorld",
6870
props: {
6971
msg: String

0 commit comments

Comments
 (0)