diff --git a/.changeset/mcp-options-exact-optional-property-types.md b/.changeset/mcp-options-exact-optional-property-types.md new file mode 100644 index 0000000000..060144e2ae --- /dev/null +++ b/.changeset/mcp-options-exact-optional-property-types.md @@ -0,0 +1,5 @@ +--- +"@better-auth/mcp": patch +--- + +Projects that enable `exactOptionalPropertyTypes` with `skipLibCheck: false` no longer get a TS2430 error from the `@better-auth/mcp` type declarations. diff --git a/packages/mcp/src/plugin.ts b/packages/mcp/src/plugin.ts index 313d9c1988..4b63499dc3 100644 --- a/packages/mcp/src/plugin.ts +++ b/packages/mcp/src/plugin.ts @@ -41,9 +41,9 @@ export interface McpOptions extends OAuthOptions { * * @default 30 */ - refreshTokenReuseInterval?: OAuthOptions< - Scope[] - >["refreshTokenReuseInterval"]; + refreshTokenReuseInterval?: NonNullable< + OAuthOptions["refreshTokenReuseInterval"] + >; /** * The canonical protected resource identifier (RFC 8707 / RFC 9728) for this * MCP server. Issued tokens are audience-bound to it, and it is published as