UNPKG

1.16 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ThrowReport = void 0;
4const Report_1 = require("./Report");
5class ThrowReport extends Report_1.Report {
6 reportCacheHit(locator) {
7 }
8 reportCacheMiss(locator) {
9 }
10 startTimerSync(what, cb) {
11 return cb();
12 }
13 async startTimerPromise(what, cb) {
14 return await cb();
15 }
16 async startCacheReport(cb) {
17 return await cb();
18 }
19 reportSeparator() {
20 }
21 reportInfo(name, text) {
22 }
23 reportWarning(name, text) {
24 }
25 reportError(name, text) {
26 }
27 reportProgress(progress) {
28 const promise = Promise.resolve().then(async () => {
29 // eslint-disable-next-line no-empty-pattern
30 for await (const {} of progress) {
31 // No need to do anything; we just want to consume the progress events
32 }
33 });
34 const stop = () => {
35 // Nothing to stop
36 };
37 return { ...promise, stop };
38 }
39 reportJson(data) {
40 // Just ignore the json output
41 }
42 async finalize() {
43 }
44}
45exports.ThrowReport = ThrowReport;