sthenault opened a new issue #14277:
URL: https://github.com/apache/echarts/issues/14277
### What problem does this feature solve?
would allow to define callback formatter with properly typed arguments: for
now I have to type ``params`` to ``any``, loosing typing within the formatter
function. For instance:
tooltip.formatter = (params: any) => {
// access to whatever in params is allowed
...
return content;
};
### What does the proposed API look like?
As I get it, ``params`` is expected to be of ``FormatterParams`` type, so
exporting in within echarts.d.ts would allow something along the line of :
import {FormatterParams} from "echarts";
...
tooltip.formatter = (params: FormatterParams) => {
// compilation error on access to something to defined in
FormatterParams
return content;
};
<!-- 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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]