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

Convert portal feature flags store to TS #15286

Open
wants to merge 1 commit into
base: type-portal-env-store
Choose a base branch
from

Conversation

aptkingston
Copy link
Member

Description

Convert portal feature flags store to TS.

The typing around flags is extremely complicated. We currently attach flags to the user object returned from the "fetch global self call", and this had been typed as Record<string, string>, probably keeping it very generic due to that complexity. That was definitely incorrect as most flags appear to be bools, so I've updated that to be Record<string, any> as I have no idea what the real flag values can be.

That's the very open ended typing I've used for the store here. Realistically I would prefer to type it as a a record of FeatureFlag to boolean, but I can't make much sense of the current flag types so I'm keeping it generic for now. I would definitely welcome any contributions to understanding how the flags are supposed to be typed, as we need to eventually pull that in to the API for the global self call too.

Copy link

qa-wolf bot commented Jan 2, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@github-actions github-actions bot added the size/s label Jan 2, 2025
@aptkingston aptkingston marked this pull request as ready for review January 3, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant