diff --git a/src/app/shared/util/report-util.ts b/src/app/shared/util/report-util.ts new file mode 100644 index 00000000..eef2e83f --- /dev/null +++ b/src/app/shared/util/report-util.ts @@ -0,0 +1,12 @@ +import { Report } from '../interfaces/report'; +import { Checkpoint } from '../interfaces/checkpoint'; + +export const ReportUtil = { + isReport(node: Report | Checkpoint): node is Report { + return !!(node as Report).xml; + }, + + isCheckPoint(node: Report | Checkpoint): node is Checkpoint { + return !!(node as Checkpoint).uid; + }, +};