Skip to content

Commit

Permalink
misc: remove lhr-lite.d.ts (#7991)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny committed Apr 5, 2019
1 parent 584bad7 commit ef3beef
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 86 deletions.
19 changes: 17 additions & 2 deletions types/audit.d.ts
Expand Up @@ -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';
}

Expand All @@ -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>;
Expand All @@ -64,23 +70,31 @@ declare global {
export interface Product {
rawValue: boolean | number | null;
displayValue?: string;
/** An explanation of why the audit failed on the test page. */
explanation?: string;
/** Error message from any exception thrown while running this audit. */
errorMessage?: string;
warnings?: string[];
/** The scored value of the audit, provided in the range `0-1`, or null if `scoreDisplayMode` indicates not scored. */
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 about the page provided by some types of audits, in one of several possible forms that can be rendered in the HTML report. */
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 why the audit failed on the test page. */
explanation?: string;
/** Error message from any exception thrown while running this audit. */
errorMessage?: string;
warnings?: string[];
/** The scored value of the audit, provided in the range `0-1`, or null if `scoreDisplayMode` indicates not scored. */
score: number|null;
/**
* A string identifying how the score should be interpreted:
Expand All @@ -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 about the page provided by some types of audits, in one of several possible forms that can be rendered in the HTML report. */
details?: Audit.Details;
}

Expand Down
82 changes: 0 additions & 82 deletions types/lhr-lite.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions types/lhr.d.ts
Expand Up @@ -46,8 +46,6 @@ declare global {
/** Descriptions of the groups referenced by CategoryMembers. */
categoryGroups?: Record<string, Result.ReportGroup>;


// Additional non-LHR-lite information.
/** The config settings used for these results. */
configSettings: Config.Settings;
/** List of top-level warnings for this Lighthouse run. */
Expand Down

0 comments on commit ef3beef

Please sign in to comment.