diff --git a/lib/index.d.ts b/lib/index.d.ts index 18898387..50f455fb 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -128,7 +128,7 @@ declare namespace MCR { path: string; type: "v8" | "istanbul"; data: any; - } | undefined; + }; export interface MetricsSummary { @@ -204,7 +204,7 @@ declare namespace MCR { watermarks: Watermarks; summary: CoverageSummary; files: CoverageFile[]; - } | undefined; + }; export type LoggingType = "off" | "error" | "info" | "debug"; export interface CoverageReportOptions { @@ -329,7 +329,7 @@ declare namespace MCR { onEntry?: (entry: V8CoverageEntry) => Promise; /** {function} onEnd hook */ - onEnd?: (coverageResults: CoverageResults) => Promise; + onEnd?: (coverageResults: CoverageResults | undefined) => Promise; [key: string]: any; } @@ -357,7 +357,7 @@ declare namespace MCR { /** add coverage data * * @param coverageData {array} V8 format, {object} Istanbul format */ - add: (coverageData: any[] | any) => Promise; + add: (coverageData: any[] | any) => Promise; /** * add V8 coverage from a dir @@ -366,7 +366,7 @@ declare namespace MCR { addFromDir: (dir: string) => Promise; /** generate report */ - generate: () => Promise; + generate: () => Promise; /** check if cache exists */ hasCache: () => boolean;