-
-
Notifications
You must be signed in to change notification settings - Fork 804
Closed
Labels
Description
Describe the bug
2e60bee changed the signature of Fuse.prototype.search.
search<T>(
pattern: string | Fuse.Expression,
options?: Fuse.FuseSearchOptions
): Fuse.FuseResult<T>[]Here T isn't constrained by any of the arguments. Therefore it defaults to unknown, making it meaningless.
I guess search<T>(...) was meant to be search(...), using T from the outer Fuse<T>?
Version
Fuse 6.4.5
Is this a regression?
Yes. Previously the type parameter was named R and was defaulted to T from the outer class Fuse<T>.
🔬Minimal Reproduction
declare const fuse: Fuse<{ id: number }>;
const matchedIds = fuse.search("").map(res => res.item.id);Additional context
Reactions are currently unavailable