title: eCharts Tooltip Typescript
body: <p>I'm using eChart v5.0.2 and working to customize the tooltip using Typescript, but can't seem to resolve this error regarding the formatter.</p>
  <p>So on the function keyword, the error message states: <strong>Type '(params: Format | Format[]) =&gt; string | Formatter' is not assignable to type 'string | Formatter | undefined'.</strong></p>
  <p>And on the params.value, the error is: <strong>Type '(params: Format | Format[]) =&gt; string | Formatter' is not assignable to type 'string | Formatter | undefined'.</strong></p>
  <p>I would really appreciate any help with this thanks!</p>
  <p>This is the code that I have:</p>
  <pre><code>
              let option: echarts.EChartOption = {
                  xAxis: {},
                  yAxis: {},
                  series: [{
                      symbolSize: 20,
                      data: chartData,
                      type: 'scatter'
                  }],
                  tooltip: {
                      showDelay: 0,
                      formatter: function (params): (string | echarts.EChartOption.Tooltip.Formatter) {
                         
                          if (params) {
                              let xValue = params.value[0];
                              let yValue = params.value[1];
                              let dttmValue = params.value[2];
  
                              return xValue + yValue + dttmValue;
                          }
  
                          return '';
                      },
                  },
              };
  
              option &amp;&amp; chart.setOption(option);```
  </code></pre>