ChepteaCatalin commented on issue #19064:
URL: https://github.com/apache/echarts/issues/19064#issuecomment-1724900414

   > Sorry if I'm misunderstanding something but I'm also getting this type 
error (given the solution above):
   > 
   > ```
   > Type '{ trigger: "axis"; axisPointer: { type: "shadow"; }; formatter: 
(params: CallbackDataParams[]) => string | 
TooltipFormatterCallback<TopLevelFormatterParams> | undefined; }' is not 
assignable to type 'TooltipOption | TooltipOption[] | undefined'.
   >   Types of property 'formatter' are incompatible.
   >     Type '(params: CallbackDataParams[]) => string | 
TooltipFormatterCallback<TopLevelFormatterParams> | undefined' is not 
assignable to type 'string | TooltipFormatterCallback<TopLevelFormatterParams> 
| undefined'.
   >       Type '(params: CallbackDataParams[]) => string | 
TooltipFormatterCallback<TopLevelFormatterParams> | undefined' is not 
assignable to type 'TooltipFormatterCallback<TopLevelFormatterParams>'.
   >         Types of parameters 'params' and 'params' are incompatible.
   >           Type 'TopLevelFormatterParams' is not assignable to type 
'CallbackDataParams[]'.
   >             Type 'CallbackDataParams' is missing the following properties 
from type 'CallbackDataParams[]': length, pop, push, concat, and 35 
more.ts(2322)
   > ```
   > 
   > This is how I typed the function:
   > 
   > ```ts
   > formatter: function(params: echarts.DefaultLabelFormatterCallbackParams[]) 
{
   > ```
   
   Try tot type the function as follows:
   ```ts
   formatter: function(params: echarts.DefaultLabelFormatterCallbackParams) {
   ```


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