diff --git a/src/internal/Subscriber.ts b/src/internal/Subscriber.ts index a09986d5c1..e682fe402b 100644 --- a/src/internal/Subscriber.ts +++ b/src/internal/Subscriber.ts @@ -203,7 +203,7 @@ export class SafeSubscriber extends Subscriber { // The first argument is a function, not an observer. The next // two arguments *could* be observers, or they could be empty. partialObserver = { - next: observerOrNext ?? undefined, + next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined), error: error ?? undefined, complete: complete ?? undefined, }; diff --git a/src/internal/operators/groupBy.ts b/src/internal/operators/groupBy.ts index 33d5b23ddd..4e4d573f86 100644 --- a/src/internal/operators/groupBy.ts +++ b/src/internal/operators/groupBy.ts @@ -147,7 +147,7 @@ export function groupBy( return operate((source, subscriber) => { let element: ((value: any) => any) | void; if (!elementOrOptions || typeof elementOrOptions === 'function') { - element = elementOrOptions; + element = elementOrOptions as ((value: any) => any); } else { ({ duration, element, connector } = elementOrOptions); } diff --git a/src/internal/operators/retry.ts b/src/internal/operators/retry.ts index 74c5f5fc0b..ed04776b55 100644 --- a/src/internal/operators/retry.ts +++ b/src/internal/operators/retry.ts @@ -86,7 +86,7 @@ export function retry(configOrCount: number | RetryConfig = Infinity): MonoTy config = configOrCount; } else { config = { - count: configOrCount, + count: configOrCount as number, }; } const { count = Infinity, delay, resetOnSuccess: resetOnSuccess = false } = config; diff --git a/src/internal/operators/shareReplay.ts b/src/internal/operators/shareReplay.ts index 095c7df111..28149a6568 100644 --- a/src/internal/operators/shareReplay.ts +++ b/src/internal/operators/shareReplay.ts @@ -161,7 +161,7 @@ export function shareReplay( if (configOrBufferSize && typeof configOrBufferSize === 'object') { ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize); } else { - bufferSize = configOrBufferSize ?? Infinity; + bufferSize = (configOrBufferSize ?? Infinity) as number; } return share({ connector: () => new ReplaySubject(bufferSize, windowTime, scheduler), diff --git a/src/internal/scheduler/intervalProvider.ts b/src/internal/scheduler/intervalProvider.ts index dc64c7c91f..6e06286e46 100644 --- a/src/internal/scheduler/intervalProvider.ts +++ b/src/internal/scheduler/intervalProvider.ts @@ -1,4 +1,4 @@ -type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => number; +type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => unknown; type ClearIntervalFunction = (handle: number) => void; interface IntervalProvider { diff --git a/src/internal/scheduler/timeoutProvider.ts b/src/internal/scheduler/timeoutProvider.ts index 8cee7673e2..4d0c7fea0f 100644 --- a/src/internal/scheduler/timeoutProvider.ts +++ b/src/internal/scheduler/timeoutProvider.ts @@ -1,4 +1,4 @@ -type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => number; +type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => unknown; type ClearTimeoutFunction = (handle: number) => void; interface TimeoutProvider { diff --git a/src/internal/util/workarounds.ts b/src/internal/util/workarounds.ts index 7a2ae54b93..00c01b881a 100644 --- a/src/internal/util/workarounds.ts +++ b/src/internal/util/workarounds.ts @@ -3,3 +3,5 @@ // Wherever possible, use a TypeScript issue number in the type - something // like TS_18757 - or use a descriptive name and leave a detailed comment // alongside the type alias. + +export {}