From 5b62c52ae44be851417940457398991d3c0681c8 Mon Sep 17 00:00:00 2001 From: cenfun Date: Sat, 2 Dec 2023 18:48:51 +0800 Subject: [PATCH] add types --- lib/index.d.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index 7a76015b..8894954b 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,8 +1,3 @@ - -/** - * monocart coverage reports - */ - export type IstanbulReportConfig = { name: string, options: any @@ -41,4 +36,12 @@ export type CoverageReportOptions = { inline?: boolean, logging?: string -}; \ No newline at end of file +}; + +export class CoverageReport { + constructor(options?: CoverageReportOptions); + add: (coverageData: any[] | any) => Promise; + generate: () => Promise; +} + +export function createCoverageReport(options?: CoverageReportOptions): CoverageReport; \ No newline at end of file