Skip to content

Commit f9f1302

Browse files
author
gwizz
committed
fix: tighten auth types for typecheck
1 parent 9e20bba commit f9f1302

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/opencode/src/auth/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export namespace Auth {
260260
return undefined
261261
}
262262

263-
export async function get(providerID: string) {
263+
export async function get(providerID: string): Promise<Info | undefined> {
264264
const store = await loadStoreFile()
265265
const entry = store.providers[providerID]
266266
if (!entry) return undefined

packages/opencode/test/auth/oauth-rotation.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe("OAuth subscription failover", () => {
2222
expires: Date.now() + 60_000,
2323
})
2424

25-
const baseFetch = async () => {
25+
const baseFetch = async (_input: RequestInfo | URL, _init?: RequestInit) => {
2626
const auth = await Auth.get(providerID)
2727
expect(auth?.type).toBe("oauth")
2828
if (!auth || auth.type !== "oauth") return new Response("no auth", { status: 500 })
@@ -96,7 +96,7 @@ describe("OAuth subscription failover", () => {
9696
expires: Date.now() + 60_000,
9797
})
9898

99-
const baseFetch = async () => {
99+
const baseFetch = async (_input: RequestInfo | URL, _init?: RequestInit) => {
100100
const auth = await Auth.get(providerID)
101101
expect(auth?.type).toBe("oauth")
102102
if (!auth || auth.type !== "oauth") return new Response("no auth", { status: 500 })

0 commit comments

Comments
 (0)