You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: Use Error.isError() when compatibility reaches Baseline (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError)
5
13
exportfunctionisError(error: unknown): error is Error{
6
-
returnerrorinstanceofError||(
7
-
error!==null&&
8
-
typeoferror==='object'&&
9
-
Object.hasOwn(error,'name')&&
10
-
Object.hasOwn(error,'cause')&&
11
-
Object.hasOwn(error,'message')
14
+
return(
15
+
errorinstanceofError||
16
+
(error!==null&&
17
+
typeoferror==='object'&&
18
+
Object.hasOwn(error,'name')&&
19
+
Object.hasOwn(error,'cause')&&
20
+
Object.hasOwn(error,'message'))
12
21
);
13
22
}
14
23
15
24
exportfunctionisResponseError(error: Error): error is ResponseErrorV1|ResponseErrorV2{
0 commit comments