Skip to content

Commit de947ad

Browse files
committed
fix: fix
1 parent 212fec9 commit de947ad

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/hooks/useLayoutEffect.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const useLayoutUpdateEffect: typeof React.useEffect = (
3636
if (!firstMount) {
3737
return callback();
3838
}
39+
// eslint-disable-next-line react-hooks/exhaustive-deps
3940
}, deps);
4041
};
4142

src/ref.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const composeRef = <T>(...refs: React.Ref<T>[]): React.Ref<T> => {
3030
export const useComposeRef = <T>(...refs: React.Ref<T>[]): React.Ref<T> => {
3131
return useMemo(
3232
() => composeRef(...refs),
33+
// eslint-disable-next-line react-hooks/exhaustive-deps
3334
refs,
3435
(prev, next) =>
3536
prev.length !== next.length || prev.every((ref, i) => ref !== next[i]),

src/setStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import type React from 'react';
22

33
export interface SetStyleOptions {
44
element?: HTMLElement;

src/test/domHook.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable no-param-reassign */
22
const NO_EXIST = { __NOT_EXIST: true };
33

4-
export type ElementClass = Function;
5-
export type Property = PropertyDescriptor | Function;
4+
export type ElementClass = (...params: any[]) => void;
5+
export type Property = PropertyDescriptor | ((...params: any[]) => void);
66

77
export function spyElementPrototypes<T extends ElementClass>(
88
elementClass: T,
@@ -22,7 +22,7 @@ export function spyElementPrototypes<T extends ElementClass>(
2222

2323
if (typeof spyProp === 'function') {
2424
// If is a function
25-
elementClass.prototype[propName] = function spyFunc(...args) {
25+
elementClass.prototype[propName] = function spyFunc(...args: any[]) {
2626
return spyProp.call(this, originDescriptor, ...args);
2727
};
2828
} else {

0 commit comments

Comments
 (0)