-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Closed
Labels
bugenThis issue is in EnglishThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.waiting-for: community
Description
Version
5.1.1
Steps to reproduce
option = {
tooltip: {
position: (pos) => [pos[0], '12px']
}
}
What is expected?
the return type of TooltipPositionCallback needs to be Array<number | string> but number[] | string[]
What is actually happening?
typecheck fails because the return type not correct
ts errors:
(property) tooltip?: Arrayable<TooltipOption> | undefined
Type '{ trigger: "axis"; enterable: true; position: (pos: [number, number]) => (string | number)[]; }' is not assignable to type 'Arrayable<TooltipOption> | undefined'.
Type '{ trigger: "axis"; enterable: true; position: (pos: [number, number]) => (string | number)[]; }' is not assignable to type 'undefined'.ts(2322)
Metadata
Metadata
Assignees
Labels
bugenThis issue is in EnglishThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.waiting-for: community