Skip to content

Remove uses of any in models.ts #180

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

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

phiggins
Copy link
Contributor

Hi 👋,

I've recently started using this library at work and was surprised to see the return type of getFeatureValue was any. I replaced that with a new type that represents the type of the value field of BaseFlag, and replaced a few more uses of any in the file where there were possible replacements. The only uses of any left are for the incoming data retrieved as json which would be more involved to fix.

@phiggins phiggins changed the title Add types in models.ts. Remove uses of any in models.ts Apr 10, 2025
Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks very much for the contribution @phiggins ! Apologies for the delayed review.

@matthewelwell matthewelwell merged commit 61975cf into Flagsmith:main Apr 24, 2025
3 checks passed
@matthewelwell
Copy link
Contributor

This is now released in v6.0.1

@phiggins phiggins deleted the ph/remove-anys branch April 25, 2025 17:38
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.

2 participants