File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export const composeRef = <T>(...refs: React.Ref<T>[]): React.Ref<T> => {
3030export 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 ] ) ,
Original file line number Diff line number Diff line change 1- import * as React from 'react' ;
1+ import type React from 'react' ;
22
33export interface SetStyleOptions {
44 element ?: HTMLElement ;
Original file line number Diff line number Diff line change 11/* eslint-disable no-param-reassign */
22const 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
77export 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 {
You can’t perform that action at this time.
0 commit comments