From 1c54cae29a02881e7dfab9804102a754a724dbd0 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: Sun, 12 May 2024 00:01:27 +0800 Subject: [PATCH] refactor(runtime-vapor): remove default value --- packages/runtime-vapor/__tests__/dom/prop.spec.ts | 2 +- packages/runtime-vapor/src/component.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/runtime-vapor/__tests__/dom/prop.spec.ts b/packages/runtime-vapor/__tests__/dom/prop.spec.ts index 8d21919e3..8f9215a8c 100644 --- a/packages/runtime-vapor/__tests__/dom/prop.spec.ts +++ b/packages/runtime-vapor/__tests__/dom/prop.spec.ts @@ -18,7 +18,7 @@ import { getCurrentScope } from '@vue/reactivity' let removeComponentInstance = NOOP beforeEach(() => { - const instance = createComponentInstance((() => {}) as any, {}) + const instance = createComponentInstance((() => {}) as any, {}, null, null) const reset = setCurrentInstance(instance) const prev = getCurrentScope() instance.scope.on() diff --git a/packages/runtime-vapor/src/component.ts b/packages/runtime-vapor/src/component.ts index 5b84b3ef4..d9f59c32d 100644 --- a/packages/runtime-vapor/src/component.ts +++ b/packages/runtime-vapor/src/component.ts @@ -259,10 +259,10 @@ let uid = 0 export function createComponentInstance( component: ObjectComponent | FunctionalComponent, rawProps: RawProps | null, - slots: Slots | null = null, - dynamicSlots: DynamicSlots | null = null, + slots: Slots | null, + dynamicSlots: DynamicSlots | null, // application root node only - appContext: AppContext | null = null, + appContext?: AppContext, ): ComponentInternalInstance { const parent = getCurrentInstance() const _appContext =