File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,19 @@ import type {
66 InferPluginTypes ,
77 InferSession ,
88 InferUser ,
9- PreserveJSDoc ,
109 PrettifyDeep ,
1110} from "./types" ;
1211import { getBaseURL } from "./utils/url" ;
1312import type { FilterActions , InferAPI } from "./types/api" ;
1413import { BASE_ERROR_CODES } from "./error/codes" ;
1514
15+ export type WithJsDoc < T , D > = Expand < T & D > ;
16+
1617export const betterAuth = < O extends BetterAuthOptions > (
17- options : PreserveJSDoc < O > ,
18+ options : WithJsDoc < O , BetterAuthOptions > ,
1819) => {
19- const authContext = init ( options ) ;
20- const { api } = getEndpoints ( authContext , options ) ;
20+ const authContext = init ( options as O ) ;
21+ const { api } = getEndpoints ( authContext , options as O ) ;
2122 const errorCodes = options . plugins ?. reduce ( ( acc , plugin ) => {
2223 if ( plugin . $ERROR_CODES ) {
2324 return {
You can’t perform that action at this time.
0 commit comments