You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/10/18 20:54:52 UTC

[GitHub] [echarts] n0099 opened a new issue #15896: [TS] `echarts.getInstanceByDom()` might return undefined before `echarts.init()`

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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] echarts-bot[bot] commented on issue #15896: [TS] `echarts.getInstanceByDom()` might return undefined before `echarts.init()`

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15896:
URL: https://github.com/apache/echarts/issues/15896#issuecomment-946352414


   This issue is labeled with `difficulty: easy`.
   @n0099 Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.
   
   Please have a look at [How to debug ECharts](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 🤓


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] plainheart commented on issue #15896: [TS] `echarts.getInstanceByDom()` might return undefined before `echarts.init()`

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #15896:
URL: https://github.com/apache/echarts/issues/15896#issuecomment-947278018


   Thanks for your feedback. We'll fix it later in the next patch version [5.2.2](https://github.com/apache/echarts/milestone/27).


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] n0099 commented on issue #15896: [TS] `echarts.getInstanceByDom()` might return undefined before `echarts.init()`

Posted by GitBox <gi...@apache.org>.
n0099 commented on issue #15896:
URL: https://github.com/apache/echarts/issues/15896#issuecomment-946931020


   > Would you mind making a fix for this TS issue? Let us know if you need any help.
   
   That's why I come here.


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] pissang closed issue #15896: [TS] `echarts.getInstanceByDom()` might return undefined before `echarts.init()`

Posted by GitBox <gi...@apache.org>.
pissang closed issue #15896:
URL: https://github.com/apache/echarts/issues/15896


   


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] echarts-bot[bot] commented on issue #15896: [TS] `echarts.getInstanceByDom()` might return undefined before `echarts.init()`

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15896:
URL: https://github.com/apache/echarts/issues/15896#issuecomment-946157168


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe to our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [echarts] plainheart commented on issue #15896: [TS] `echarts.getInstanceByDom()` might return undefined before `echarts.init()`

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #15896:
URL: https://github.com/apache/echarts/issues/15896#issuecomment-946311839


   Would you mind making a fix for this TS issue? Let us know if you need any help.


-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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