n0099 opened a new issue #15896:
URL: https://github.com/apache/echarts/issues/15896


   ### Version
   5.2.1
   
   ### Reproduction link
   [https://jsfiddle.net/a3pt60sz/](https://jsfiddle.net/a3pt60sz/)
   
   ### Steps to reproduce
   but the type define of `getInstanceByDom()` only indicated that it will 
always return a echarts instance:
   
https://github.com/apache/echarts/blob/b78d0af598775e921b616291765ba10adb5347b7/src/core/echarts.ts#L2656
   
   ### What is expected?
   ```ts
   declare function getInstanceByDom(dom: HTMLElement): EChartsType | undefined;
   declare function getInstanceById(key: string): EChartsType | undefined;
   ```
   
   ### What is actually happening?
   ```ts
   declare function getInstanceByDom(dom: HTMLElement): EChartsType;
   declare function getInstanceById(key: string): EChartsType;
   ```
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to