You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-6
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,12 @@ Cheatsheets for experienced Vue developers getting started with TypeScript
18
18
npm install --global @vue/cli
19
19
20
20
# 2. Create a new project, then choose the "Manually select features" option
21
-
vue create my-project-name
21
+
vue create <my-project-name>
22
22
```
23
23
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.
25
25
26
-
> ⚠ Current in beta. Don't use in production.
26
+
> ⚠ Currently in beta. Do not use in production.
27
27
28
28
```bash
29
29
npm init vite-app <project-name>
@@ -36,7 +36,7 @@ Cheatsheets for experienced Vue developers getting started with TypeScript
36
36
37
37
## Recommended `ts.config` setup
38
38
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`
40
40
```json
41
41
// tsconfig.json
42
42
{
@@ -51,19 +51,21 @@ note: `strict:true` stricter inference for data properties on `this`. If you do
51
51
52
52
## Usage in `.vue` files
53
53
Add `lang="ts"` to the script tag to declare TS as the `lang` used.
54
-
```vue
54
+
```js
55
55
<script lang="ts">
56
56
...
57
57
</script>
58
58
```
59
59
60
60
In Vue 2.x you need to define components with `Vue.component` or `Vue.extend`:
0 commit comments