From f4805f6b3636bd4ed7b6ce30395eb02cebb285f0 Mon Sep 17 00:00:00 2001 From: Luan Date: Tue, 22 Jul 2025 15:24:30 -0300 Subject: [PATCH] chore: lint --- .gitignore | 3 +++ src/core/SabrUmpProcessor.ts | 2 +- src/utils/CacheManager.ts | 5 ++++- src/utils/formatKeyUtils.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f73e780..66c3118 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ yarn-error.log* lerna-debug.log* .pnpm-debug.log* +# WebStorm +.idea/ + # Coverage directory used by tools like istanbul coverage *.lcov diff --git a/src/core/SabrUmpProcessor.ts b/src/core/SabrUmpProcessor.ts index 79b287a..5fb4345 100644 --- a/src/core/SabrUmpProcessor.ts +++ b/src/core/SabrUmpProcessor.ts @@ -103,7 +103,7 @@ export class SabrUmpProcessor { }); } - public getSegmentInfo() { + public getSegmentInfo(): Segment | undefined { return this.partialSegments.get(this.desiredHeaderId || 0); } diff --git a/src/utils/CacheManager.ts b/src/utils/CacheManager.ts index 6921b57..3102d1f 100644 --- a/src/utils/CacheManager.ts +++ b/src/utils/CacheManager.ts @@ -26,7 +26,10 @@ export class CacheManager { this.startGarbageCollection(); } - public getCacheEntries() { + public getCacheEntries(): { + initSegmentCache: Map; + segmentCache: Map; + } { return { initSegmentCache: this.initSegmentCache, segmentCache: this.segmentCache diff --git a/src/utils/formatKeyUtils.ts b/src/utils/formatKeyUtils.ts index 04d9b03..5a2831f 100644 --- a/src/utils/formatKeyUtils.ts +++ b/src/utils/formatKeyUtils.ts @@ -82,7 +82,7 @@ export function createSegmentCacheKeyFromMetadata( * @param format - The SabrFormat object. * @returns A unique string identifier for the format. */ -export function getUniqueFormatId(format: SabrFormat) { +export function getUniqueFormatId(format: SabrFormat): string { if (format.width) return format.itag.toString();