Make type checking all use typeof
This commit is contained in:
@@ -78,9 +78,8 @@ export interface ErrorLike {
|
||||
|
||||
function isErrorLike(error: any): error is ErrorLike {
|
||||
if (
|
||||
error.message !== undefined &&
|
||||
typeof error.message === "string" &&
|
||||
(error.stack === undefined || typeof error.stack === "string")
|
||||
(typeof error.stack === "undefined" || typeof error.stack === "string")
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user