-
-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Typescript] FuseOptionKeyObject
type doesn't match the implementation
#655
Labels
Comments
BenJenkinson
added a commit
to BenJenkinson/Fuse
that referenced
this issue
May 5, 2022
### Changes - **Make `FuseOptionKeyObject.weight` property optional (and add description taken from docs)** - **Add `FuseOptionKeyObject.getFn` property (and add description taken from docs)** - Add `FuseOptionKeyObjectGetFunction` type to match existing `FuseGetFunction` type - Make `FuseOptionKeyObject` a generic, to allow typing the `getFn` method argument - Make `FuseOptionKey` a generic, to allow making `FuseOptionKeyObject` a generic - Convert some existing inline comments `// foo` to jsdoc comments `/** foo */` so they will be included in intellisense ### Related issues - Fixes krisk#655 ### See also - PR krisk#648
BenJenkinson
added a commit
to BenJenkinson/Fuse
that referenced
this issue
May 5, 2022
…k#655 - Make `FuseOptionKeyObject.weight` property optional (and add description taken from docs) - Add `FuseOptionKeyObject.getFn` property (and add description taken from docs) - Add `FuseOptionKeyObjectGetFunction` type to match existing `FuseGetFunction` type - Make `FuseOptionKeyObject` a generic, to allow typing the `getFn` method argument - Make `FuseOptionKey` a generic, to allow making `FuseOptionKeyObject` a generic - Convert some existing inline comments `// foo` to jsdoc comments `/** foo */` so they will be included in intellisense
BenJenkinson
added a commit
to BenJenkinson/Fuse
that referenced
this issue
May 5, 2022
…k#655 - Make `FuseOptionKeyObject.weight` property optional (and add description taken from docs) - Add `FuseOptionKeyObject.getFn` property (and add description taken from docs) - Add `FuseOptionKeyObjectGetFunction` type to match existing `FuseGetFunction` type - Make `FuseOptionKeyObject` a generic, to allow typing the `getFn` method argument - Make `FuseOptionKey` a generic, to allow making `FuseOptionKeyObject` a generic - Convert some existing inline comments `// foo` to jsdoc comments `/** foo */` so they will be included in intellisense
Does look like a regression specifically for the |
krisk
added a commit
that referenced
this issue
May 6, 2022
krisk
added a commit
that referenced
this issue
May 6, 2022
krisk
added a commit
that referenced
this issue
May 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
FuseOptionKeyObject
type definition doesn't match the implementation.Fuse/src/index.d.ts
Lines 234 to 239 in 6afcfaf
The
weight
property may be optional. (Since if not specified, Fuse will default it to1
)Fuse/src/tools/KeyStore.js
Lines 59 to 65 in 6afcfaf
The
getFn
property is missing.Fuse/docs/examples.md
Lines 170 to 180 in 6afcfaf
Version
6.6.0
Is this a regression?
No
🔬Minimal Reproduction (in Typescript)
weight
property cannot be omitted without an error.getFn
example from the docs cannot be written without an error.The text was updated successfully, but these errors were encountered: