mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 23:53:17 -05:00
chore: improve jsdoc comment for betterAuth instance (#6910)
This commit is contained in:
committed by
github-actions[bot]
parent
ae3b3f7386
commit
ad3c0b591f
@@ -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 extends BetterAuthOptions>(
|
||||
options: Options &
|
||||
// fixme(alex): do we need Record<never, never> here?
|
||||
Record<never, never>,
|
||||
options: Options & Record<never, never>,
|
||||
): Auth<Options> => {
|
||||
return createBetterAuth(options, init);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user