Skip to content

Commit 33c5cef

Browse files
committed
refactor: change convert function to default export
1 parent 59c356c commit 33c5cef

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/js/packages/event-to-object/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const maxDepthSignal = { __stop__: true };
33
/**
44
* Convert any class object (such as `Event`) to a plain object.
55
*/
6-
export function convert(
6+
export default function convert(
77
classObject: { [key: string]: any },
88
maxDepth: number = 3,
99
): object {

src/js/packages/event-to-object/tests/tooling/check.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export function checkEventConversion(
3939
writable: true,
4040
configurable: true,
4141
});
42-
} catch (e) {}
42+
} catch {
43+
// ignore
44+
}
4345
}
4446
}
4547

@@ -51,7 +53,9 @@ export function checkEventConversion(
5153
writable: true,
5254
configurable: true,
5355
});
54-
} catch (e) {}
56+
} catch {
57+
// ignore
58+
}
5559

5660
// Patch undefined properties that are expected to be 0 or null
5761
const defaults: any = {
@@ -81,7 +85,9 @@ export function checkEventConversion(
8185
writable: true,
8286
configurable: true,
8387
});
84-
} catch (e) {}
88+
} catch {
89+
// ignore
90+
}
8591
}
8692
}
8793

0 commit comments

Comments
 (0)