diff --git a/src/getCustomHelia.ts b/src/getCustomHelia.ts index e20ec9e..678a2ef 100644 --- a/src/getCustomHelia.ts +++ b/src/getCustomHelia.ts @@ -25,12 +25,12 @@ export async function getCustomHelia (): Promise { let blockstore: HeliaInit['blockstore'] | undefined if (FILE_BLOCKSTORE_PATH != null) { - blockstore = new LevelBlockstore(FILE_BLOCKSTORE_PATH) as HeliaInit['blockstore'] + blockstore = new LevelBlockstore(FILE_BLOCKSTORE_PATH) } let datastore: HeliaInit['datastore'] | undefined if (FILE_DATASTORE_PATH != null) { - datastore = new LevelDatastore(FILE_DATASTORE_PATH) as HeliaInit['datastore'] + datastore = new LevelDatastore(FILE_DATASTORE_PATH) } if (USE_LIBP2P || USE_BITSWAP) { @@ -39,7 +39,7 @@ export async function getCustomHelia (): Promise { blockstore, datastore, blockBrokers - }) as unknown as Promise + }) } const routers: HeliaInit['routers'] = [] @@ -52,5 +52,5 @@ export async function getCustomHelia (): Promise { datastore, blockBrokers, routers - }) as unknown as Promise + }) } diff --git a/src/heliaServer.ts b/src/heliaServer.ts index 5391bf2..5239510 100644 --- a/src/heliaServer.ts +++ b/src/heliaServer.ts @@ -1,6 +1,5 @@ -/* eslint-disable @typescript-eslint/strict-boolean-expressions */ import { setMaxListeners } from 'node:events' -import { createVerifiedFetch } from '@helia/verified-fetch' +import { createVerifiedFetch, type VerifiedFetch } from '@helia/verified-fetch' import { type FastifyReply, type FastifyRequest, type RouteGenericInterface } from 'fastify' import { USE_SUBDOMAINS } from './constants.js' import { contentTypeParser } from './content-type-parser.js' @@ -43,7 +42,7 @@ interface HeliaFetchOptions extends HeliaPathParts { } export class HeliaServer { - private heliaFetch!: Awaited> + private heliaFetch!: VerifiedFetch private heliaVersionInfo!: { Version: string, Commit: string } private readonly HOST_PART_REGEX = /^(?
.+)\.(?ip[fn]s)\..+$/ private readonly log: Logger