fix(mcp): keep McpOptions assignable to OAuthOptions under exactOptionalPropertyTypes (#11635)

This commit is contained in:
Gustavo Valverde
2026-10-08 15:21:14 +01:00
committed by GitHub
parent c68b2cd8a5
commit a5d582aaff
2 changed files with 8 additions and 3 deletions
@@ -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.
+3 -3
View File
@@ -41,9 +41,9 @@ export interface McpOptions extends OAuthOptions<Scope[]> {
*
* @default 30
*/
refreshTokenReuseInterval?: OAuthOptions<
Scope[]
>["refreshTokenReuseInterval"];
refreshTokenReuseInterval?: NonNullable<
OAuthOptions<Scope[]>["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