Skip to content

Commit cb1e26e

Browse files
committed
frontend: convert equal to typescript
1 parent 9674c21 commit cb1e26e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontends/web/src/utils/equal.js renamed to frontends/web/src/utils/equal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ const isArray = Array.isArray;
1818
const keyList = Object.keys;
1919
const hasProp = Object.prototype.hasOwnProperty;
2020

21-
export function equal(a, b) {
21+
export function equal(a: any, b: any): boolean {
2222
if (Object.is(a, b)) {
2323
return true;
2424
}
2525

2626
if (a && b && typeof a === 'object' && typeof b === 'object') {
27-
let arrA = isArray(a), arrB = isArray(b), i, length, key;
27+
let arrA = isArray(a), arrB = isArray(b), i: number, length: number, key: string;
2828

2929
if (arrA && arrB) {
3030
length = a.length;

0 commit comments

Comments
 (0)