Skip to content

Commit 59688eb

Browse files
ndbroadbentclaude
andcommitted
Fix FetchFn type compatibility for CI
Make FetchFn accept both HttpResponse and Response types to fix TypeScript errors in CI where Bun's Response type is stricter. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 83e900d commit 59688eb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/search/openlibrary.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import { DEFAULT_TIMEOUT, DEFAULT_USER_AGENT } from './types'
1414
const SEARCH_API = 'https://openlibrary.org/search.json'
1515

1616
/**
17-
* Fetch function type that returns HttpResponse.
17+
* Fetch function type - compatible with both HttpResponse and standard Response.
1818
*/
19-
type FetchFn = (url: string, init?: RequestInit) => Promise<HttpResponse>
19+
type FetchFn = (url: string, init?: RequestInit) => Promise<HttpResponse | Response>
2020

2121
/**
2222
* Configuration for Open Library search.

src/search/wikidata.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import {
2020
const SPARQL_ENDPOINT = 'https://query.wikidata.org/sparql'
2121

2222
/**
23-
* Fetch function type that returns HttpResponse.
23+
* Fetch function type - compatible with both HttpResponse and standard Response.
2424
*/
25-
type FetchFn = (url: string, init?: RequestInit) => Promise<HttpResponse>
25+
type FetchFn = (url: string, init?: RequestInit) => Promise<HttpResponse | Response>
2626

2727
/**
2828
* Configuration for Wikidata search.

0 commit comments

Comments
 (0)