1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-24 23:26:50 +02:00

Tools: Apply rule @typescript-eslint/type-annotation-spacing

This commit is contained in:
Laurent Cozic
2020-11-12 19:13:28 +00:00
parent 62feb7ff60
commit d20694e52c
291 changed files with 2205 additions and 2203 deletions

View File

@ -3,9 +3,9 @@
// This wraps an error message, allowing to set a prefix,
// while preserving all the important properties
// in particular the stack trace and original error message.
export function wrapError(prefix:string, error:any) {
export function wrapError(prefix: string, error: any) {
if (!error) throw new Error('Unknown error');
const newError:any = new Error([prefix, error.message || ''].join(': '));
const newError: any = new Error([prefix, error.message || ''].join(': '));
if ('name' in error) newError.name = error.name;
if ('fileName' in error) newError.fileName = error.fileName;