You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/10/20 03:24:05 UTC

[echarts] branch fix-types created (now 1ee1ae0)

This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a change to branch fix-types
in repository https://gitbox.apache.org/repos/asf/echarts.git.


      at 1ee1ae0  fix(types): add `undefined` for the return type of `getInstanceByDom` & `getInstanceById`.

This branch includes the following new commits:

     new 1ee1ae0  fix(types): add `undefined` for the return type of `getInstanceByDom` & `getInstanceById`.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[echarts] 01/01: fix(types): add `undefined` for the return type of `getInstanceByDom` & `getInstanceById`.

Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch fix-types
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 1ee1ae003ce24c6d167b446ba5ea3630468a38ca
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Wed Oct 20 11:20:44 2021 +0800

    fix(types): add `undefined` for the return type of `getInstanceByDom` & `getInstanceById`.
---
 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 8a61c98..1bd2609 100644
--- a/src/core/echarts.ts
+++ b/src/core/echarts.ts
@@ -2653,11 +2653,11 @@ export function dispose(chart: EChartsType | HTMLElement | string): void {
     }
 }
 
-export function getInstanceByDom(dom: HTMLElement): EChartsType {
+export function getInstanceByDom(dom: HTMLElement): EChartsType | undefined {
     return instances[modelUtil.getAttribute(dom, DOM_ATTRIBUTE_KEY)];
 }
 
-export function getInstanceById(key: string): EChartsType {
+export function getInstanceById(key: string): EChartsType | undefined {
     return instances[key];
 }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org