Skip to content

Commit 288d55a

Browse files
authored
update Ref type import
In TypeScript 4.5+, This practice appears error message(`TS1444: 'Ref' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.`). We should change Type import mode. Reference linking: https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta
1 parent 9fcf20b commit 288d55a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/typescript/composition-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ year.value = '2020'
162162
Sometimes we may need to specify complex types for a ref's inner value. We can do that by using the `Ref` type:
163163

164164
```ts
165-
import { ref, Ref } from 'vue'
165+
import { ref, type Ref } from 'vue'
166166

167167
const year: Ref<string | number> = ref('2020')
168168

0 commit comments

Comments
 (0)