Skip to content

Commit c4c5e22

Browse files
committed
FIx linting
1 parent a12d971 commit c4c5e22

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/event/typed.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import EventEmitter from 'eventemitter3';
88

99
// https://github.com/binier/tiny-typed-emitter
1010
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;
1312
};
1413

1514
export type DefaultListeners = Record<string | symbol, (...args: unknown[]) => unknown>;

src/platform/deno.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4150,7 +4150,6 @@ declare class CustomEvent<T = any> extends Event {
41504150

41514151
interface ErrorConstructor {
41524152
/** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */
4153-
// eslint-disable-next-line @typescript-eslint/ban-types
41544153
captureStackTrace(error: Object, constructor?: Function): void;
41554154
// TODO(nayeemrmn): Support `Error.prepareStackTrace()`. We currently use this
41564155
// internally in a way that makes it unavailable for users.

src/util/platform.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
*/
66

77

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>;
1111

1212
export function isNode(): boolean {
13-
return typeof process !== 'undefined' && process.release && process.release.name === 'node';
13+
return !!(process && process.release && process.release.name === 'node');
1414
}
1515

1616
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);
1818
}
1919

2020
export function isBrowser(): boolean {
21-
return typeof navigator !== 'undefined' && 'userAgent' in navigator;
21+
return navigator && 'userAgent' in navigator;
2222
}

0 commit comments

Comments
 (0)