@@ -7,7 +7,7 @@ function jestFakeTimersAreEnabled() {
7
7
if ( typeof jest !== 'undefined' && jest !== null ) {
8
8
return (
9
9
// legacy timers
10
- setTimeout . _isMockFunction === true ||
10
+ ( setTimeout as any ) . _isMockFunction === true ||
11
11
// modern timers
12
12
Object . prototype . hasOwnProperty . call ( setTimeout , 'clock' )
13
13
)
@@ -23,7 +23,7 @@ function getDocument() {
23
23
}
24
24
return window . document
25
25
}
26
- function getWindowFromNode ( node ) {
26
+ function getWindowFromNode ( node : any ) {
27
27
if ( node . defaultView ) {
28
28
// node is document
29
29
return node . defaultView
@@ -60,11 +60,11 @@ function getWindowFromNode(node) {
60
60
}
61
61
}
62
62
63
- function checkContainerType ( container ) {
63
+ function checkContainerType ( container : unknown ) {
64
64
if (
65
65
! container ||
66
- ! ( typeof container . querySelector === 'function' ) ||
67
- ! ( typeof container . querySelectorAll === 'function' )
66
+ ! ( typeof ( container as any ) . querySelector === 'function' ) ||
67
+ ! ( typeof ( container as any ) . querySelectorAll === 'function' )
68
68
) {
69
69
throw new TypeError (
70
70
`Expected container to be an Element, a Document or a DocumentFragment but got ${ getTypeName (
@@ -73,7 +73,7 @@ function checkContainerType(container) {
73
73
)
74
74
}
75
75
76
- function getTypeName ( object ) {
76
+ function getTypeName ( object : unknown ) {
77
77
if ( typeof object === 'object' ) {
78
78
return object === null ? 'null' : object . constructor . name
79
79
}
0 commit comments