From 06bdf13a3d8c471a69eaaa773c3ef6b3d2b32624 Mon Sep 17 00:00:00 2001 From: Brendan Kenny Date: Wed, 15 Sep 2021 16:21:15 -0500 Subject: [PATCH] core: make main tsc compile cacheable (#13069) --- lighthouse-core/index.js | 4 ++++ tsconfig.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lighthouse-core/index.js b/lighthouse-core/index.js index 4c0acf298610..373a8cc1eee9 100644 --- a/lighthouse-core/index.js +++ b/lighthouse-core/index.js @@ -70,6 +70,10 @@ lighthouse.getAuditList = Runner.getAuditList; lighthouse.traceCategories = require('./gather/driver.js').traceCategories; lighthouse.Audit = require('./audits/audit.js'); lighthouse.Gatherer = require('./gather/gatherers/gatherer.js'); + +// Explicit type reference (hidden by makeComputedArtifact) for d.ts export. +// TODO(esmodules): should be a workaround for module.export and can be removed when in esm. +/** @type {typeof import('./computed/network-records.js')} */ lighthouse.NetworkRecords = require('./computed/network-records.js'); module.exports = lighthouse; diff --git a/tsconfig.json b/tsconfig.json index b2c926eb8be2..bdddf11d97b6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "noEmit": true, + "emitDeclarationOnly": true, "module": "commonjs", "target": "ES2020", "allowJs": true,