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;
};
What problem does this feature solve?
would allow to define callback formatter with properly typed arguments: for now I have to type
paramstoany, loosing typing within the formatter function. For instance:What does the proposed API look like?
As I get it,
paramsis expected to be ofFormatterParamstype, so exporting in within echarts.d.ts would allow something along the line of :