Skip to content

Commit d933db3

Browse files
📝 Add docstrings to kagol/add-opentiny-next-sdk
Docstrings generation was requested by @kagol. * #165 (comment) The following files were modified: * `template/tinyvue/src/utils/base-utils.ts`
1 parent 521b9e7 commit d933db3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

template/tinyvue/src/utils/base-utils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { CommonError } from '@/types/global';
22

3+
/**
4+
* Determines whether a value conforms to the CommonError shape.
5+
*
6+
* @param error - The value to test for a CommonError-like object
7+
* @returns `true` if `error` is a non-null object that has a `message` property of type `string`, `false` otherwise.
8+
*/
39
export function isCommonError(error: unknown): error is CommonError {
410
return (
511
typeof error === 'object' &&
@@ -28,4 +34,4 @@ export default class BaseUtils {
2834
return new Error(String(error));
2935
}
3036
}
31-
}
37+
}

0 commit comments

Comments
 (0)