From 09f61b4049a48d93cfd7c91c5b7860f313ebf28b Mon Sep 17 00:00:00 2001 From: Pick Date: Tue, 14 Jul 2020 00:44:37 +0800 Subject: [PATCH] types(runtime-core): adjust Renderer's type declaration (#1566) --- packages/runtime-core/src/renderer.ts | 2 +- packages/runtime-dom/src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 0b3bd831..cbde56ac 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -66,7 +66,7 @@ import { invokeDirectiveHook } from './directives' import { startMeasure, endMeasure } from './profiling' import { ComponentPublicInstance } from './componentProxy' -export interface Renderer { +export interface Renderer { render: RootRenderFunction createApp: CreateAppFunction } diff --git a/packages/runtime-dom/src/index.ts b/packages/runtime-dom/src/index.ts index fc73bf92..05cca770 100644 --- a/packages/runtime-dom/src/index.ts +++ b/packages/runtime-dom/src/index.ts @@ -25,12 +25,12 @@ const rendererOptions = extend({ patchProp, forcePatchProp }, nodeOps) // lazy create the renderer - this makes core renderer logic tree-shakable // in case the user only imports reactivity utilities from Vue. -let renderer: Renderer | HydrationRenderer +let renderer: Renderer | HydrationRenderer let enabledHydration = false function ensureRenderer() { - return renderer || (renderer = createRenderer(rendererOptions)) + return renderer || (renderer = createRenderer(rendererOptions)) } function ensureHydrationRenderer() {