From fa5dbd8c6cb14b92bc42226275aadf8a1813f3b2 Mon Sep 17 00:00:00 2001 From: Liangzhen Zhu Date: Thu, 27 Apr 2023 22:50:12 +0800 Subject: [PATCH] update `init` function type signature so it can be identical to document --- src/core/echarts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/echarts.ts b/src/core/echarts.ts index a332312f3a..fe8fc38329 100644 --- a/src/core/echarts.ts +++ b/src/core/echarts.ts @@ -2638,8 +2638,8 @@ const DOM_ATTRIBUTE_KEY = '_echarts_instance_'; * @param opts.useDirtyRect Enable dirty rectangle rendering or not. */ export function init( - dom: HTMLElement, - theme?: string | object, + dom?: HTMLElement | null, + theme?: string | object | null, opts?: EChartsInitOpts ): EChartsType { const isClient = !(opts && opts.ssr);