[[email protected]] - [[email protected]] - Type issue with custom positioners using existing positioners as base position.
Expected behavior
Following the samples here and here should not lead to a type error.
Current behavior
When using the sample to create a custom positioner, a typescript error is shown
The 'this' context of type 'TooltipPositionerMap' is not assignable to method's 'this' of type 'TooltipModel<keyof ChartTypeRegistry>'. Type 'TooltipPositionerMap' is missing the following properties from type 'TooltipModel<keyof ChartTypeRegistry>': chart, dataPoints, xAlign, yAlign, and 23 more.(2684)
Reproducible sample
https://stackblitz.com/edit/vitejs-vite-jgc8rw?file=src%2Fmain.ts
Optional extra steps/info to reproduce
The definition is in src/definitions/global.d.ts and the issue can be seen in src/main.ts
Possible solution
No response
Context
No response
chart.js version
4.4.4
Browser name and version
No response
Link to your project
No response
+1 to fix this. Its a bit silly this is the example that is in the docs and it gives type errors https://www.chartjs.org/docs/latest/samples/tooltip/position.html