From 1675b6d723829d1f61e697735e3da7b16aa1362d Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 25 Jun 2021 16:18:21 -0400 Subject: [PATCH] fix: defineExpose type definition and runtime warning --- packages/runtime-core/src/apiSetupHelpers.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/runtime-core/src/apiSetupHelpers.ts b/packages/runtime-core/src/apiSetupHelpers.ts index 4679df90193..c1703f22333 100644 --- a/packages/runtime-core/src/apiSetupHelpers.ts +++ b/packages/runtime-core/src/apiSetupHelpers.ts @@ -61,6 +61,16 @@ export function defineEmits() { */ export const defineEmit = defineEmits +export function defineExpose(exposed?: Record) { + if (__DEV__) { + warn( + `defineExpose() is a compiler-hint helper that is only usable inside ` + + `