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 environment store to TS #15285

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

Conversation

aptkingston
Copy link
Member

Description

Convert environment store to TS

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/m label Jan 2, 2025
@aptkingston aptkingston changed the title Convert environment store to TS Convert portal environment store to TS Jan 2, 2025
@aptkingston aptkingston marked this pull request as ready for review January 2, 2025 16:16
@aptkingston aptkingston requested a review from PClmnt January 3, 2025 09:00

async loadVariables() {
if (get(licensing).environmentVariablesEnabled) {
const envVars: string[] = (await API.fetchEnvironmentVariables())
Copy link
Collaborator

@PClmnt PClmnt Jan 3, 2025

Choose a reason for hiding this comment

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

NAB: Don't think we need to have this type annotation here do we? string[] will be inferred from the API? I could be wrong

Copy link
Member Author

Choose a reason for hiding this comment

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

We do actually, only because the API response type is a custom thing (something along the lines of FetchEnvironvmentVariablesResponse) which is itself just aliased to a string[], but I'd rather store a normal string array in the store instead of the response type, hence the casting here.

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.

2 participants