Skip to content

fix(typescript): type definition for FuseOptionKeyObject, fixes #655#656

Merged
krisk merged 2 commits intokrisk:masterfrom
BenJenkinson:patch-2
May 6, 2022
Merged

fix(typescript): type definition for FuseOptionKeyObject, fixes #655#656
krisk merged 2 commits intokrisk:masterfrom
BenJenkinson:patch-2

Conversation

@BenJenkinson
Copy link
Copy Markdown
Contributor

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

Was this a regression?

No, the weight property has never been defined as optional and the getFn property was introduced in 6.6.0

…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 BenJenkinson changed the title fix(typescript): type definition for `FuseOptionKeyObject, fixes #655 fix(typescript): type definition for FuseOptionKeyObject, fixes #655 May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Typescript] FuseOptionKeyObject type doesn't match the implementation

2 participants