Closed mrazauskas closed 2 months ago
Currently CoverageResults needs to be wrapped with NonNullable to be consumed in the user land. Example: https://github.com/tstyche/tstyche/blob/a8479a1641971560eb341222fa184546826beb2b/scripts/merge-coverage-reports.js#L8
CoverageResults
NonNullable
Also note that getSnapshot() method does not handle undefined, but reportData is typed as a union with undefined: https://github.com/cenfun/monocart-coverage-reports/blob/6a4360272460b8b5011b0c51a03360cce893fcaa/lib/utils/snapshot.js#L228-L231
getSnapshot()
undefined
reportData
This PR fixes both of these issues.
Currently
CoverageResults
needs to be wrapped withNonNullable
to be consumed in the user land. Example: https://github.com/tstyche/tstyche/blob/a8479a1641971560eb341222fa184546826beb2b/scripts/merge-coverage-reports.js#L8Also note that
getSnapshot()
method does not handleundefined
, butreportData
is typed as a union withundefined
: https://github.com/cenfun/monocart-coverage-reports/blob/6a4360272460b8b5011b0c51a03360cce893fcaa/lib/utils/snapshot.js#L228-L231This PR fixes both of these issues.