Skip to content

Commit 7335759

Browse files
committed
fix(ts): extract EmailConfigServerOptions to interface
1 parent 97c77ff commit 7335759

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

types/providers.d.ts

+11-10
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,19 @@ export type CredentialsProviderType = "Credentials"
121121

122122
/** Email Provider */
123123

124+
export interface EmailConfigServerOptions {
125+
host: string
126+
port: number
127+
auth: {
128+
user: string
129+
pass: string
130+
}
131+
}
132+
124133
export interface EmailConfig extends CommonProviderOptions {
125134
type: "email"
126-
server:
127-
| string
128-
| {
129-
host: string
130-
port: number
131-
auth: {
132-
user: string
133-
pass: string
134-
}
135-
}
135+
// TODO: Make use of https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html
136+
server: string | EmailConfigServerOptions
136137
from?: string
137138
maxAge?: number
138139
sendVerificationRequest(params: {

0 commit comments

Comments
 (0)