2
0
Shun Miyazawa 3 жил өмнө
parent
commit
bf7fc9920f

+ 5 - 0
packages/app/src/interfaces/errors/v3-error.ts

@@ -1,3 +1,8 @@
 import { ErrorV3 } from '@growi/core';
 
 export type IErrorV3 = ErrorV3
+
+// type guard
+export const isErrorV3 = (args: any): args is IErrorV3 => {
+  return args.message != null && args.code != null;
+};