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 2020/12/21 09:23:32 UTC

[GitHub] [incubator-echarts] Emeryao commented on issue #13755: Export `ECharts` class in TypeScript

Emeryao commented on issue #13755:
URL: https://github.com/apache/incubator-echarts/issues/13755#issuecomment-748868757


   > @ilueckel Hi, we will plan to export more types
   > 
   > before that, you can use
   > 
   > ```ts
   > type EChartsInstance = ReturnType<init>;
   > ```
   > 
   > as a workaround.
   
   
   In my case the workaround above does not work but the codes below worked around
   
   ```typescript
   import * as echarts from 'echarts';
   type ECharts = ReturnType<typeof echarts.init>;
   let chart = echarts.init(someElement);
   ```
   
   echarts@v5.0.0
   TypeScript@v4.0.5


----------------------------------------------------------------
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.

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