diff --git a/src/compat/event_listeners.ts b/src/compat/event_listeners.ts index 694fe333ea..24d1df96a4 100644 --- a/src/compat/event_listeners.ts +++ b/src/compat/event_listeners.ts @@ -287,7 +287,7 @@ function getVideoVisibilityRef( stopListening : CancellationSignal ) : IReadOnlySharedReference { const isDocVisibleRef = getDocumentVisibilityRef(stopListening); - let currentTimeout : number | NodeJS.Timeout | undefined; + let currentTimeout : number | undefined; const ref = new SharedReference(true, stopListening); stopListening.register(() => { clearTimeout(currentTimeout); diff --git a/src/compat/global_scope.ts b/src/compat/global_scope.ts index f2d00dd5ed..0d23391fba 100644 --- a/src/compat/global_scope.ts +++ b/src/compat/global_scope.ts @@ -1,6 +1,8 @@ import isNode from "./is_node"; import isWorker from "./is_worker"; +declare const global: typeof self; + /** * The current environment's global object, written in such a way to maximize * compatibility. diff --git a/src/core/fetchers/cdn_prioritizer.ts b/src/core/fetchers/cdn_prioritizer.ts index 1e5e776bca..924f8a0740 100644 --- a/src/core/fetchers/cdn_prioritizer.ts +++ b/src/core/fetchers/cdn_prioritizer.ts @@ -56,7 +56,7 @@ export default class CdnPrioritizer extends EventEmitter * `metadata` array which is used considerably more than the `timeouts` * array. */ - timeouts : Array; + timeouts : number[]; }; /** diff --git a/src/utils/request/fetch.ts b/src/utils/request/fetch.ts index 5c8ff7aeb9..486af2cb0e 100644 --- a/src/utils/request/fetch.ts +++ b/src/utils/request/fetch.ts @@ -146,7 +146,7 @@ export default function fetchRequest( abortController.abort(); } - let timeout : number | NodeJS.Timeout | undefined; + let timeout : number | undefined; if (options.timeout !== undefined) { timeout = setTimeout(() => { timeouted = true; diff --git a/src/utils/request/xhr.ts b/src/utils/request/xhr.ts index 54bd8fd504..6d708a5d85 100644 --- a/src/utils/request/xhr.ts +++ b/src/utils/request/xhr.ts @@ -81,7 +81,7 @@ export default function request( const xhr = new XMLHttpRequest(); xhr.open("GET", url, true); - let timeoutId : undefined | number | NodeJS.Timeout; + let timeoutId : undefined | number; if (timeout !== undefined) { xhr.timeout = timeout;