diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca1b820..01bf506 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,5 +24,7 @@ jobs: cache: 'pnpm' - name: Install run: pnpm install + - name: Build + run: pnpm build - name: Test run: pnpm test diff --git a/src/api.ts b/src/api.ts index dce5a69..130a7c9 100644 --- a/src/api.ts +++ b/src/api.ts @@ -47,9 +47,11 @@ export interface ByteRange { length: number } +type FetchError = NotFound | Aborted | NetworkError | QueryError + export interface Locator { /** Retrieves the location of a blob of content. */ - locate (digest: MultihashDigest, options?: LocateOptions): Promise> + locate (digest: MultihashDigest, options?: LocateOptions): Promise> /** * Returns a similar locator which only locates content belonging to the given * Spaces. @@ -59,7 +61,7 @@ export interface Locator { export interface Fetcher { /** Fetches the bytes that correspond to the passed multihash digest. */ - fetch (digest: MultihashDigest, options?: FetchOptions): Promise> + fetch (digest: MultihashDigest, options?: FetchOptions): Promise> } export interface NotFound extends Failure {