Skip to content
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

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

Merged
merged 2 commits into from
May 6, 2022

Conversation

BenJenkinson
Copy link
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