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

misc: simplify LH.Config settings types #8630

Merged
merged 1 commit into from
Apr 26, 2019
Merged

misc: simplify LH.Config settings types #8630

merged 1 commit into from
Apr 26, 2019

Conversation

brendankenny
Copy link
Member

We missed this simplification while doing the flags/settings unification stuff.

We needed extraHeaders to be a more specific type for configJson settings at some point, but it's now the same type as on the base SharedFlagsSettings, so LH.Config.Json['settings'] can just be SharedFlagsSettings, as you'd pretty much expect.

@brendankenny
Copy link
Member Author

this doesn't have any material effect, just noticed when looking at budget types that we had an intermediate type we don't need anymore.

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

SGTM

@@ -15,18 +15,14 @@ declare global {
*/
export interface Json {
extends?: 'lighthouse:default' | 'lighthouse:full' | string | boolean;
settings?: SettingsJson;
settings?: SharedFlagsSettings;
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems like we could just call this settings and CliFlags extends settings then :)

Copy link
Member Author

Choose a reason for hiding this comment

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

seems like we could just call this settings and CliFlags extends settings then :)

ha, we could. For whatever reason the name SharedFlagsSettings does a poor job to indicate that it's literally "the properties shared by flags and settings" to me :)

@brendankenny brendankenny merged commit 8709364 into master Apr 26, 2019
@brendankenny brendankenny deleted the settings branch April 26, 2019 19:35
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