Skip to content

Commit da2aa30

Browse files
committed
fix: add type assertion for npm registry response
1 parent aeb4cd7 commit da2aa30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async function fetchLatestVersion(): Promise<string | null> {
6868
{ signal: AbortSignal.timeout(3000) }
6969
);
7070
if (!response.ok) return null;
71-
const data = await response.json();
71+
const data = (await response.json()) as { version?: string };
7272
return data.version || null;
7373
} catch {
7474
return null;

0 commit comments

Comments
 (0)