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

Merged
merged 2 commits into from
Jan 6, 2025
Merged

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.

Base automatically changed from type-portal-email-store to master January 6, 2025 10:05
@aptkingston aptkingston enabled auto-merge January 6, 2025 10:06
@aptkingston aptkingston merged commit d1c4c66 into master Jan 6, 2025
20 checks passed
@aptkingston aptkingston deleted the type-portal-env-store branch January 6, 2025 10:10
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants