From 8b9ba20b990d894e991b335ea9191d858ffbb149 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Wed, 7 Jan 2026 14:17:25 +0800 Subject: [PATCH] fix: type --- .../better-auth/src/plugins/organization/organization.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/better-auth/src/plugins/organization/organization.ts b/packages/better-auth/src/plugins/organization/organization.ts index 6075c91c16..4e944be7cc 100644 --- a/packages/better-auth/src/plugins/organization/organization.ts +++ b/packages/better-auth/src/plugins/organization/organization.ts @@ -72,7 +72,7 @@ declare module "@better-auth/core" { // biome-ignore lint/correctness/noUnusedVariables: Auth and Context need to be same as declared in the module interface BetterAuthPluginRegistry { organization: { - creator: typeof organization; + creator: OrganizationPluginCreator; }; } } @@ -295,6 +295,12 @@ export type OrganizationPlugin = { options: NoInfer; }; +export interface OrganizationPluginCreator { + ( + options?: O | undefined, + ): OrganizationPlugin; +} + /** * Organization plugin for Better Auth. Organization allows you to create teams, members, * and manage access control for your users.