Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix build error #28

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jobs:
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Build
run: pnpm build
- name: Test
run: pnpm test
6 changes: 4 additions & 2 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Result<Location, NotFound|Aborted|NetworkError|QueryError>>
locate (digest: MultihashDigest, options?: LocateOptions): Promise<Result<Location, FetchError>>
/**
* Returns a similar locator which only locates content belonging to the given
* Spaces.
Expand All @@ -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<Result<Blob, NotFound|Aborted|NetworkError>>
fetch (digest: MultihashDigest, options?: FetchOptions): Promise<Result<Blob, FetchError>>
}

export interface NotFound extends Failure {
Expand Down
Loading