About `typescript` question? Does this need to be installed again?
RSS1102 opened this issue · 4 comments
Does this need to be installed again?
- It says "nuxt 3 is fully typed and provides helpful shortcuts to ensure you have access to accurate type information when you are coding".https://v3.nuxtjs.org/guide/concepts/typescript。
2.I do not install typescript
, but I still have type verification.
You should write it like this let name: string | number = '123'
.
By the way, String
shoud be 'string'.
You should write it like this
let name: string | number = '123'
.By the way,
String
shoud be 'string'.
OK,This is my mistake. My main question is to ask the difference between installing typescript
and not.
The above figure is just to prove that I have not installed typescript
, and I can still make type judgment.
I don't quite understand the difference between whether to install or not.(To determine if I want to install typescript
as well)
thanks.
If you install typescript
, you can control the version of typescript.
If you do not install it, it will invoke global typescript or a version of typescript invoked by another package.
If you don't want typescript type check, write it like this:
<script setup>
// just remove lang="ts" in script
</script>
ok,Thank you very much for your answer.