From 5740020208785a6680545084d40aa2cb3373adf5 Mon Sep 17 00:00:00 2001 From: Julien Ripouteau Date: Sat, 18 May 2024 09:20:13 +0200 Subject: [PATCH] fix: typecheck error --- app/services/packages_fetcher.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/packages_fetcher.ts b/app/services/packages_fetcher.ts index cced50d..dfea953 100644 --- a/app/services/packages_fetcher.ts +++ b/app/services/packages_fetcher.ts @@ -77,7 +77,7 @@ export class PackagesFetcher { * Merge raw package .yml data with the stats fetched from npm/github stored * on our database */ - #mergePackageStatsAndInfo(pkg: PackageInfo, stats: PackageStats | undefined) { + #mergePackageStatsAndInfo(pkg: PackageInfo, stats: PackageStats) { return { ...pkg, firstReleaseAt: stats?.firstReleaseAt?.toISODate() || undefined, @@ -132,7 +132,7 @@ export class PackagesFetcher { const stats = await PackageStats.all() let packages = [...this.packagesList].map((pkg) => { const info = stats.find((info) => info.packageName === pkg.name) - return this.#mergePackageStatsAndInfo(pkg, info) + return this.#mergePackageStatsAndInfo(pkg, info!) }) /**