You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note how this is in direct conflict with the documented usage, since the docs indicate an object should be returned, whereas the type indicates that a boolean should be returned.
Expected behavior
The documentation and the type should match. Potentially, this means that the type might need to be adjusted?
Steps to reproduce
Setup a project using Typescript
Try to instantiate a new TomSelect with a function on the create setting:
Bug description
The documentation provides the following function assignment for the
create
setting:However, when trying to use any of these with Typescript, the type checker complains:
Type '(input: string) => { value: string; text: string; }' is not assignable to type 'boolean | TomCreate | undefined'.
Inspecting the TomCreate type:
Note how this is in direct conflict with the documented usage, since the docs indicate an object should be returned, whereas the type indicates that a boolean should be returned.
Expected behavior
The documentation and the type should match. Potentially, this means that the type might need to be adjusted?
Steps to reproduce
create
setting:Additional context
"typescript": "^5.3.3"
"tom-select": "^2.3.1",
The text was updated successfully, but these errors were encountered: