diff --git a/packages/auth/index.ts b/packages/auth/index.ts index 5fa108f..8fda016 100644 --- a/packages/auth/index.ts +++ b/packages/auth/index.ts @@ -78,8 +78,13 @@ const getAuth = () => { export const auth = new Proxy({} as Auth, { get(_target, property) { const authClient = getAuth(); - const value = Reflect.get(authClient, property); - return typeof value === 'function' ? value.bind(authClient) : value; + const value: unknown = Reflect.get(authClient, property); + return typeof value === 'function' + ? (value as (...args: unknown[]) => unknown).bind(authClient) + : value; + }, + has(_target, property) { + return Reflect.has(getAuth(), property); }, }); diff --git a/packages/db/index.ts b/packages/db/index.ts index af304f0..b8cf638 100644 --- a/packages/db/index.ts +++ b/packages/db/index.ts @@ -30,8 +30,10 @@ const getQueryClient = () => { export const queryClient = new Proxy({} as Client, { get(_target, property) { const client = getQueryClient(); - const value = Reflect.get(client, property); - return typeof value === 'function' ? value.bind(client) : value; + const value: unknown = Reflect.get(client, property); + return typeof value === 'function' + ? (value as (...args: unknown[]) => unknown).bind(client) + : value; }, set(_target, property, value) { return Reflect.set(getQueryClient(), property, value); @@ -55,8 +57,10 @@ const getDb = () => { export const db = new Proxy({} as Database, { get(_target, property) { const database = getDb(); - const value = Reflect.get(database, property); - return typeof value === 'function' ? value.bind(database) : value; + const value: unknown = Reflect.get(database, property); + return typeof value === 'function' + ? (value as (...args: unknown[]) => unknown).bind(database) + : value; }, set(_target, property, value) { return Reflect.set(getDb(), property, value);