From 652ac28af64322ae989eda66752d3735dc33ca88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Wed, 29 Mar 2023 21:17:28 +0800 Subject: [PATCH] fix: types --- packages/compiler-sfc/src/compileScript.ts | 6 +++--- packages/runtime-core/src/index.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 4fd3408ef00..3125b85acb3 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -68,7 +68,7 @@ const DEFINE_EMITS = 'defineEmits' const DEFINE_EXPOSE = 'defineExpose' const WITH_DEFAULTS = 'withDefaults' const DEFINE_OPTIONS = 'defineOptions' -const DEFINT_SLOTS = 'defineSlots' +const DEFINE_SLOTS = 'defineSlots' // constants const DEFAULT_VAR = `__default__` @@ -596,11 +596,11 @@ export function compileScript( } function processDefineSlots(node: Node, declId?: LVal): boolean { - if (!isCallOf(node, DEFINT_SLOTS)) { + if (!isCallOf(node, DEFINE_SLOTS)) { return false } if (hasDefineSlotsCall) { - error(`duplicate ${DEFINT_SLOTS}() call`, node) + error(`duplicate ${DEFINE_SLOTS}() call`, node) } hasDefineSlotsCall = true diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index 06f9a2affd4..f388ba7b65d 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -69,6 +69,7 @@ export { defineEmits, defineExpose, defineOptions, + defineSlots, withDefaults, // internal mergeDefaults,