-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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: remove lhr-lite.d.ts #7991
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,17 @@ declare global { | |
} | ||
|
||
export interface ScoreDisplayModes { | ||
/** Scores of 0-1 (map to displayed scores of 0-100). */ | ||
NUMERIC: 'numeric'; | ||
/** Pass/fail audit (0 and 1 are only possible scores). */ | ||
BINARY: 'binary'; | ||
/** The audit exists only to tell you to review something yourself. Score is null and should be ignored. */ | ||
MANUAL: 'manual'; | ||
/** The audit is an FYI only, and can't be interpreted as pass/fail. Score is null and should be ignored. */ | ||
INFORMATIVE: 'informative'; | ||
/** The audit turned out to not apply to the page. Score is null and should be ignored. */ | ||
NOT_APPLICABLE: 'notApplicable'; | ||
/** There was an error while running the audit (check `errorMessage` for details). Score is null and should be ignored. */ | ||
ERROR: 'error'; | ||
} | ||
|
||
|
@@ -45,7 +51,7 @@ declare global { | |
title: string; | ||
/** Short, user-visible title for the audit when failing. */ | ||
failureTitle?: string; | ||
/** Explanation of why the user should care about the audit. */ | ||
/** A more detailed description that describes why the audit is important and links to Lighthouse documentation on the audit; markdown links supported. */ | ||
description: string; | ||
/** A list of the members of LH.Artifacts that must be present for the audit to execute. */ | ||
requiredArtifacts: Array<keyof Artifacts>; | ||
|
@@ -64,23 +70,31 @@ declare global { | |
export interface Product { | ||
rawValue: boolean | number | null; | ||
displayValue?: string; | ||
/** An explanation of audit-related issues encountered on the test page. */ | ||
explanation?: string; | ||
/** Error message from any exception thrown while running this audit. */ | ||
errorMessage?: string; | ||
warnings?: string[]; | ||
/** The scored value determined by the audit, in the range `0-1`, or null if `scoreDisplayMode` indicates not scored. */ | ||
brendankenny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
score?: number; | ||
/** Deprecated and does not make its way into the Lighthouse report. */ | ||
extendedInfo?: {[p: string]: any}; | ||
/** Overrides scoreDisplayMode with notApplicable if set to true */ | ||
notApplicable?: boolean; | ||
/** Extra information provided by some types of audits. */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems about as descriptive as do we want to talk about how this is structured data for the renderer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Fair :)
I took a two second stab at it :) |
||
details?: Audit.Details; | ||
} | ||
|
||
/* Audit result returned in Lighthouse report. All audits offer a description and score of 0-1 */ | ||
/* Audit result returned in Lighthouse report. All audits offer a description and score of 0-1. */ | ||
export interface Result { | ||
rawValue: boolean | number | null; | ||
displayValue?: string; | ||
/** An explanation of audit-related issues encountered on the test page. */ | ||
brendankenny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
explanation?: string; | ||
/** Error message from any exception thrown while running this audit. */ | ||
errorMessage?: string; | ||
warnings?: string[]; | ||
/** The scored value determined by the audit, in the range `0-1`, or null if `scoreDisplayMode` indicates not scored. */ | ||
brendankenny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
score: number|null; | ||
/** | ||
* A string identifying how the score should be interpreted: | ||
|
@@ -98,6 +112,7 @@ declare global { | |
id: string; | ||
/** A more detailed description that describes why the audit is important and links to Lighthouse documentation on the audit; markdown links supported. */ | ||
description: string; | ||
/** Extra information provided by some types of audits. */ | ||
details?: Audit.Details; | ||
} | ||
|
||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somewhat unrelated, but instead of duplicating should this
Pick<>
+ extend fromResult
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I was thinking about the same thing while doing this, I think it's worth trying to make it work.