File tree 3 files changed +7
-9
lines changed
3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ import EventEmitter from 'eventemitter3';
8
8
9
9
// https://github.com/binier/tiny-typed-emitter
10
10
export type TypedListeners < L > = {
11
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
- [ E in keyof L ] : ( ...args : any [ ] ) => unknown ;
11
+ [ E in keyof L ] : ( ...args : unknown [ ] ) => unknown ;
13
12
} ;
14
13
15
14
export type DefaultListeners = Record < string | symbol , ( ...args : unknown [ ] ) => unknown > ;
Original file line number Diff line number Diff line change @@ -4150,7 +4150,6 @@ declare class CustomEvent<T = any> extends Event {
4150
4150
4151
4151
interface ErrorConstructor {
4152
4152
/** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */
4153
- // eslint-disable-next-line @typescript-eslint/ban-types
4154
4153
captureStackTrace ( error : Object , constructor ?: Function ) : void ;
4155
4154
// TODO(nayeemrmn): Support `Error.prepareStackTrace()`. We currently use this
4156
4155
// internally in a way that makes it unavailable for users.
Original file line number Diff line number Diff line change 5
5
*/
6
6
7
7
8
- declare let process : any ;
9
- declare let window : any ;
10
- declare let navigator : any ;
8
+ declare let process : { release ?: { name ?: string } } & Record < string , unknown > | undefined ;
9
+ declare let window : { Deno ?: { version ?: { deno ?: string } } } & Record < string , unknown > | undefined ;
10
+ declare let navigator : Record < string , unknown > ;
11
11
12
12
export function isNode ( ) : boolean {
13
- return typeof process !== 'undefined' && process . release && process . release . name === 'node' ;
13
+ return ! ! ( process && process . release && process . release . name === 'node' ) ;
14
14
}
15
15
16
16
export function isDeno ( ) : boolean {
17
- return typeof window !== 'undefined' && window . Deno && window . Deno . version && window . Deno . version . deno ;
17
+ return ! ! ( window && window . Deno && window . Deno . version && window . Deno . version ) ;
18
18
}
19
19
20
20
export function isBrowser ( ) : boolean {
21
- return typeof navigator !== 'undefined' && 'userAgent' in navigator ;
21
+ return navigator && 'userAgent' in navigator ;
22
22
}
You can’t perform that action at this time.
0 commit comments