Skip to content

Commit de89335

Browse files
committed
shallowEqual
1 parent ab3b6a2 commit de89335

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/shallowEqual.js renamed to src/utils/shallowEqual.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
function is(x, y) {
1+
function is(x: unknown, y: unknown) {
22
if (x === y) {
33
return x !== 0 || y !== 0 || 1 / x === 1 / y
44
} else {
55
return x !== x && y !== y
66
}
77
}
88

9-
export default function shallowEqual(objA, objB) {
9+
export default function shallowEqual(objA: any, objB: any) {
1010
if (is(objA, objB)) return true
1111

1212
if (

0 commit comments

Comments
 (0)