From ad3c0b591fd108f8feb6557fb8a0de71e03c161a Mon Sep 17 00:00:00 2001 From: Bereket Engida <86073083+Bekacru@users.noreply.github.com> Date: Mon, 22 Dec 2025 02:16:44 -0800 Subject: [PATCH] chore: improve jsdoc comment for `betterAuth` instance (#6910) --- packages/better-auth/src/auth/auth.ts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/packages/better-auth/src/auth/auth.ts b/packages/better-auth/src/auth/auth.ts index c5beed3e5f..b0ce3c10b4 100644 --- a/packages/better-auth/src/auth/auth.ts +++ b/packages/better-auth/src/auth/auth.ts @@ -6,12 +6,26 @@ import { createBetterAuth } from "./base"; /** * Better Auth initializer for full mode (with Kysely) * - * Check `minimal.ts` for minimal mode (without Kysely) + * @example + * ```ts + * import { betterAuth } from "better-auth"; + * + * const auth = betterAuth({ + * database: new PostgresDialect({ connection: process.env.DATABASE_URL }), + * }); + * ``` + * + * For minimal mode (without Kysely), import from `better-auth/minimal` instead + * @example + * ```ts + * import { betterAuth } from "better-auth/minimal"; + * + * const auth = betterAuth({ + * database: drizzleAdapter(db, { provider: "pg" }), + * }); */ export const betterAuth = ( - options: Options & - // fixme(alex): do we need Record here? - Record, + options: Options & Record, ): Auth => { return createBetterAuth(options, init); };