Remove @ts-ignores.

Co-authored-by: Yash Singh <saiansh2525@gmail.com>
This commit is contained in:
Sidharth Vinod
2022-08-25 21:53:36 +05:30
parent 84148d4891
commit a3dfc4c0e8
8 changed files with 32 additions and 18 deletions

View File

@@ -933,6 +933,20 @@ export const sanitizeCss = (str) => {
return str;
};
export interface DetailedError {
str: string;
hash: any;
}
export function isDetailedError(error: unknown): error is DetailedError {
return 'str' in error;
}
export function getErrorMessage(error: unknown): string {
if (error instanceof Error) return error.message;
return String(error);
}
export default {
assignWithDepth,
wrapLabel,