cleanup any casts (#270371)

related to #269213
cc @mjbvz @jrieken
This commit is contained in:
João Moreno
2025-10-08 16:05:31 +02:00
committed by GitHub
parent 5250788a9b
commit f4c2700d45
27 changed files with 235 additions and 197 deletions

View File

@@ -24,11 +24,7 @@ export interface CallbackTask extends BaseTask {
export type Task = PromiseTask | StreamTask | CallbackTask;
function _isPromise(p: Promise<void> | NodeJS.ReadWriteStream): p is Promise<void> {
// eslint-disable-next-line local/code-no-any-casts
if (typeof (<any>p).then === 'function') {
return true;
}
return false;
return typeof (p as Promise<void>).then === 'function';
}
function _renderTime(time: number): string {