From ccf3e31ca2a9231d619a4a3ebad257c32d1fad49 Mon Sep 17 00:00:00 2001 From: Theo Ephraim Date: Thu, 3 Feb 2022 17:42:54 -0600 Subject: [PATCH 1/2] add clarification about type exports in SFCs Latest vue / volar / vue-tsc complains when exporting additional types from SFCs (even though it worked previously). It seems this may be the intended behaviour, but was a bit unclear in these docs, so this change specifically calls out exporting types. --- src/api/sfc-script-setup.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/api/sfc-script-setup.md b/src/api/sfc-script-setup.md index cf73d9356c..012c28c44d 100644 --- a/src/api/sfc-script-setup.md +++ b/src/api/sfc-script-setup.md @@ -223,7 +223,7 @@ const attrs = useAttrs() ` + + +``` + ### Type-only props/emit declarations Props and emits can also be declared using pure-type syntax by passing a literal type argument to `defineProps` or `defineEmits`: From 7daccd4075f9868a145e66164811c42e27e0401d Mon Sep 17 00:00:00 2001 From: Theo Ephraim Date: Thu, 3 Feb 2022 17:46:14 -0600 Subject: [PATCH 2/2] Update sfc-script-setup.md --- src/api/sfc-script-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/sfc-script-setup.md b/src/api/sfc-script-setup.md index 012c28c44d..fcf0462278 100644 --- a/src/api/sfc-script-setup.md +++ b/src/api/sfc-script-setup.md @@ -223,7 +223,7 @@ const attrs = useAttrs() `