From 288d55abd515665b200725fd6646a2b09f2fd953 Mon Sep 17 00:00:00 2001 From: Jeff <739175122@qq.com> Date: Sat, 12 Mar 2022 20:50:40 +0800 Subject: [PATCH] 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 --- src/guide/typescript/composition-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/typescript/composition-api.md b/src/guide/typescript/composition-api.md index c0f1443cf9..f4c2f0ff2c 100644 --- a/src/guide/typescript/composition-api.md +++ b/src/guide/typescript/composition-api.md @@ -162,7 +162,7 @@ year.value = '2020' Sometimes we may need to specify complex types for a ref's inner value. We can do that by using the `Ref` type: ```ts -import { ref, Ref } from 'vue' +import { ref, type Ref } from 'vue' const year: Ref = ref('2020')