diff --git a/docs/architecture.md b/docs/architecture.md index b907290a9810..a21b9db4efbf 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -84,7 +84,7 @@ Tracing processor takes the output of trace of tab and identifies the top-level ## Audits -The return value of each audit [takes this shape](https://github.com/GoogleChrome/lighthouse/blob/8f500e00243e07ef0a80b39334bedcc8ddc8d3d0/typings/audit.d.ts#L117-L130). +The return value of each audit [takes this shape](https://github.com/GoogleChrome/lighthouse/blob/09cc741c54bfdf6f6851dae1c749dd46a52d6a1f/typings/audit.d.ts#L133-L159). The `details` object is parsed in report-renderer.js. View other audits for guidance on how to structure `details`. diff --git a/docs/readme.md b/docs/readme.md index 7e4085aa291c..51cf8fbe8bc3 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -16,7 +16,7 @@ function launchChromeAndRunLighthouse(url, opts, config = null) { opts.port = chrome.port; return lighthouse(url, opts, config).then(results => { // use results.lhr for the JS-consumeable output - // https://github.com/GoogleChrome/lighthouse/blob/master/typings/lhr.d.ts + // https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr.d.ts // use results.report for the HTML/JSON/CSV output as a string // use results.artifacts for the trace/screenshots/other specific case you need (rarer) return chrome.kill().then(() => results.lhr) @@ -50,7 +50,7 @@ You can also craft your own config (e.g. [mixed-content-config.js](https://githu ### Differences from CLI flags -Note that some flag functionality is only available to the CLI. The set of shared flags that work in both node and CLI can be found [in our typedefs](https://github.com/GoogleChrome/lighthouse/blob/8f500e00243e07ef0a80b39334bedcc8ddc8d3d0/typings/externs.d.ts#L68). In most cases, the functionality is not offered in the node module simply because it is easier and more flexible to do it yourself. +Note that some flag functionality is only available to the CLI. The set of shared flags that work in both node and CLI can be found [in our typedefs](https://github.com/GoogleChrome/lighthouse/blob/888bd6dc9d927a734a8e20ea8a0248baa5b425ed/typings/externs.d.ts#L82-L119). In most cases, the functionality is not offered in the node module simply because it is easier and more flexible to do it yourself. | CLI Flag | Differences in Node | | - | - | diff --git a/docs/understanding-results.md b/docs/understanding-results.md index e9fe1128ae64..17b8dbe23ad7 100644 --- a/docs/understanding-results.md +++ b/docs/understanding-results.md @@ -6,7 +6,7 @@ The result object contains all the audit information Lighthouse determined about The top-level Lighthouse Result object (LHR) is what the lighthouse node module returns and the entirety of the JSON output of the CLI. It contains some metadata about the run and the results in the various subproperties below. -For an always up-to-date definition of the LHR, take a look [at our typedefs](https://github.com/GoogleChrome/lighthouse/blob/master/typings/lhr.d.ts). +For an always up-to-date definition of the LHR, take a look [at our typedefs](https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr.d.ts). ### Properties diff --git a/lighthouse-viewer/tsconfig.json b/lighthouse-viewer/tsconfig.json index 64579db9163a..8996a9d996c9 100644 --- a/lighthouse-viewer/tsconfig.json +++ b/lighthouse-viewer/tsconfig.json @@ -3,13 +3,13 @@ "compilerOptions": { "typeRoots": [ "@types", - "../typings", + "../types", "./types", ], }, "include": [ "app/src/**/*.js", - "../typings/*.d.ts", + "../types/*.d.ts", "./types/*.d.ts", ], } diff --git a/proto/lighthouse-result.proto b/proto/lighthouse-result.proto index 0af762379418..e4468277c342 100644 --- a/proto/lighthouse-result.proto +++ b/proto/lighthouse-result.proto @@ -54,7 +54,7 @@ enum LighthouseError { } // The overarching Lighthouse Response object (LHR) -// https://github.com/GoogleChrome/lighthouse/blob/master/typings/lhr.d.ts +// https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr.d.ts message LighthouseResult { // The timestamp of when the results were generated. google.protobuf.Timestamp fetch_time = 1; diff --git a/tsconfig.json b/tsconfig.json index 88bcb7e99c61..6d57b103eab5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ // "noErrorTruncation": true, "typeRoots": [ "@types", - "./typings" + "./types" ], "resolveJsonModule": true, @@ -21,7 +21,7 @@ "lighthouse-core/**/*.js", "clients/**/*.js", "build/**/*.js", - "./typings/*.d.ts", + "./types/*.d.ts", ], "exclude": [ "lighthouse-cli/test/**/*.js", diff --git a/typings/artifacts.d.ts b/types/artifacts.d.ts similarity index 100% rename from typings/artifacts.d.ts rename to types/artifacts.d.ts diff --git a/typings/audit.d.ts b/types/audit.d.ts similarity index 100% rename from typings/audit.d.ts rename to types/audit.d.ts diff --git a/typings/config.d.ts b/types/config.d.ts similarity index 100% rename from typings/config.d.ts rename to types/config.d.ts diff --git a/typings/cssstyle/index.d.ts b/types/cssstyle/index.d.ts similarity index 100% rename from typings/cssstyle/index.d.ts rename to types/cssstyle/index.d.ts diff --git a/typings/externs.d.ts b/types/externs.d.ts similarity index 100% rename from typings/externs.d.ts rename to types/externs.d.ts diff --git a/typings/gatherer.d.ts b/types/gatherer.d.ts similarity index 100% rename from typings/gatherer.d.ts rename to types/gatherer.d.ts diff --git a/typings/html-renderer.d.ts b/types/html-renderer.d.ts similarity index 100% rename from typings/html-renderer.d.ts rename to types/html-renderer.d.ts diff --git a/typings/http-link-header/index.d.ts b/types/http-link-header/index.d.ts similarity index 100% rename from typings/http-link-header/index.d.ts rename to types/http-link-header/index.d.ts diff --git a/typings/intl-messageformat-parser/index.d.ts b/types/intl-messageformat-parser/index.d.ts similarity index 100% rename from typings/intl-messageformat-parser/index.d.ts rename to types/intl-messageformat-parser/index.d.ts diff --git a/typings/lhr-lite.d.ts b/types/lhr-lite.d.ts similarity index 100% rename from typings/lhr-lite.d.ts rename to types/lhr-lite.d.ts diff --git a/typings/lhr.d.ts b/types/lhr.d.ts similarity index 100% rename from typings/lhr.d.ts rename to types/lhr.d.ts diff --git a/typings/lighthouse-logger/index.d.ts b/types/lighthouse-logger/index.d.ts similarity index 100% rename from typings/lighthouse-logger/index.d.ts rename to types/lighthouse-logger/index.d.ts diff --git a/typings/lookup-closest-locale/index.d.ts b/types/lookup-closest-locale/index.d.ts similarity index 100% rename from typings/lookup-closest-locale/index.d.ts rename to types/lookup-closest-locale/index.d.ts diff --git a/typings/metaviewport-parser/index.d.ts b/types/metaviewport-parser/index.d.ts similarity index 100% rename from typings/metaviewport-parser/index.d.ts rename to types/metaviewport-parser/index.d.ts diff --git a/typings/node.d.ts b/types/node.d.ts similarity index 100% rename from typings/node.d.ts rename to types/node.d.ts diff --git a/typings/pretty-json-stringify/index.d.ts b/types/pretty-json-stringify/index.d.ts similarity index 100% rename from typings/pretty-json-stringify/index.d.ts rename to types/pretty-json-stringify/index.d.ts diff --git a/typings/protocol.d.ts b/types/protocol.d.ts similarity index 100% rename from typings/protocol.d.ts rename to types/protocol.d.ts diff --git a/typings/robots-parser/index.d.ts b/types/robots-parser/index.d.ts similarity index 100% rename from typings/robots-parser/index.d.ts rename to types/robots-parser/index.d.ts diff --git a/typings/yargs-parser/index.d.ts b/types/yargs-parser/index.d.ts similarity index 100% rename from typings/yargs-parser/index.d.ts rename to types/yargs-parser/index.d.ts