@@ -124,7 +124,7 @@ export default function typeDetect(obj: unknown): string {
124
124
* - IE <=11 === "[object Object]"
125
125
* - IE Edge <=13 === "[object Object]"
126
126
*/
127
- if ( typeof window . location === 'object' && obj === window . location ) {
127
+ if ( typeof ( window as any ) . location === 'object' && obj === ( window as any ) . location ) {
128
128
return 'Location' ;
129
129
}
130
130
@@ -147,19 +147,19 @@ export default function typeDetect(obj: unknown): string {
147
147
* - IE 11 === "[object HTMLDocument]"
148
148
* - IE Edge <=13 === "[object HTMLDocument]"
149
149
*/
150
- if ( typeof window . document === 'object' && obj === window . document ) {
150
+ if ( typeof ( window as any ) . document === 'object' && obj === ( window as any ) . document ) {
151
151
return 'Document' ;
152
152
}
153
153
154
- if ( typeof window . navigator === 'object' ) {
154
+ if ( typeof ( window as any ) . navigator === 'object' ) {
155
155
/* ! Spec Conformance
156
156
* (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)
157
157
* WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray
158
158
* Test: `Object.prototype.toString.call(navigator.mimeTypes)``
159
159
* - IE <=10 === "[object MSMimeTypesCollection]"
160
160
*/
161
- if ( typeof window . navigator . mimeTypes === 'object' &&
162
- obj === window . navigator . mimeTypes ) {
161
+ if ( typeof ( window as any ) . navigator . mimeTypes === 'object' &&
162
+ obj === ( window as any ) . navigator . mimeTypes ) {
163
163
return 'MimeTypeArray' ;
164
164
}
165
165
@@ -169,22 +169,22 @@ export default function typeDetect(obj: unknown): string {
169
169
* Test: `Object.prototype.toString.call(navigator.plugins)``
170
170
* - IE <=10 === "[object MSPluginsCollection]"
171
171
*/
172
- if ( typeof window . navigator . plugins === 'object' &&
173
- obj === window . navigator . plugins ) {
172
+ if ( typeof ( window as any ) . navigator . plugins === 'object' &&
173
+ obj === ( window as any ) . navigator . plugins ) {
174
174
return 'PluginArray' ;
175
175
}
176
176
}
177
177
178
- if ( ( typeof window . HTMLElement === 'function' ||
179
- typeof window . HTMLElement === 'object' ) &&
180
- obj instanceof window . HTMLElement ) {
178
+ if ( ( typeof ( window as any ) . HTMLElement === 'function' ||
179
+ typeof ( window as any ) . HTMLElement === 'object' ) &&
180
+ obj instanceof ( window as any ) . HTMLElement ) {
181
181
/* ! Spec Conformance
182
182
* (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)
183
183
* WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`
184
184
* Test: `Object.prototype.toString.call(document.createElement('blockquote'))``
185
185
* - IE <=10 === "[object HTMLBlockElement]"
186
186
*/
187
- if ( obj . tagName === 'BLOCKQUOTE' ) {
187
+ if ( ( obj as any ) . tagName === 'BLOCKQUOTE' ) {
188
188
return 'HTMLQuoteElement' ;
189
189
}
190
190
@@ -200,7 +200,7 @@ export default function typeDetect(obj: unknown): string {
200
200
* - Firefox === "[object HTMLTableCellElement]"
201
201
* - Safari === "[object HTMLTableCellElement]"
202
202
*/
203
- if ( obj . tagName === 'TD' ) {
203
+ if ( ( obj as any ) . tagName === 'TD' ) {
204
204
return 'HTMLTableDataCellElement' ;
205
205
}
206
206
@@ -216,7 +216,7 @@ export default function typeDetect(obj: unknown): string {
216
216
* - Firefox === "[object HTMLTableCellElement]"
217
217
* - Safari === "[object HTMLTableCellElement]"
218
218
*/
219
- if ( obj . tagName === 'TH' ) {
219
+ if ( ( obj as any ) . tagName === 'TH' ) {
220
220
return 'HTMLTableHeaderCellElement' ;
221
221
}
222
222
}
0 commit comments