File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,16 @@ function inject(t, list) {
255
255
props . push ( t . objectProperty ( t . stringLiteral ( 'action' ) , action ) ) ;
256
256
}
257
257
if ( elt . defaultValue ) {
258
- const parsedValue = parseDefaultValue ( elt , elt . defaultValue , t ) ;
258
+ let parsedValue = parseDefaultValue ( elt , elt . defaultValue , t ) ;
259
+ if ( ! parsedValue ) {
260
+ for ( const type of elt . typeAnnotation . types ) {
261
+ elt . type = type . type ;
262
+ parsedValue = parseDefaultValue ( elt , elt . defaultValue , t ) ;
263
+ if ( parsedValue ) {
264
+ break ;
265
+ }
266
+ }
267
+ }
259
268
if ( parsedValue ) {
260
269
props . push ( t . objectProperty ( t . stringLiteral ( 'default' ) , parsedValue ) ) ;
261
270
} else {
Original file line number Diff line number Diff line change @@ -493,7 +493,6 @@ module.exports.ParseServerOptions = {
493
493
env : 'PARSE_SERVER_SEND_USER_EMAIL_VERIFICATION' ,
494
494
help :
495
495
'Set to `false` to prevent sending of verification email. Supports a function with a return value of `true` or `false` for conditional email sending.<br><br>Default is `true`.<br>' ,
496
- action : parsers . booleanParser ,
497
496
default : true ,
498
497
} ,
499
498
serverCloseComplete : {
@@ -543,7 +542,6 @@ module.exports.ParseServerOptions = {
543
542
env : 'PARSE_SERVER_VERIFY_USER_EMAILS' ,
544
543
help :
545
544
'Set to `true` to require users to verify their email address to complete the sign-up process. Supports a function with a return value of `true` or `false` for conditional verification.<br><br>Default is `false`.' ,
546
- action : parsers . booleanParser ,
547
545
default : false ,
548
546
} ,
549
547
webhookKey : {
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ export interface ParseServerOptions {
157
157
<br><br>
158
158
Default is `false`.
159
159
:DEFAULT: false */
160
- verifyUserEmails: ?boolean ;
160
+ verifyUserEmails: ?( boolean | void ) ;
161
161
/* Set to `true` to prevent a user from logging in if the email has not yet been verified and email verification is required.
162
162
<br><br>
163
163
Default is `false`.
@@ -186,7 +186,7 @@ export interface ParseServerOptions {
186
186
Default is `true`.
187
187
<br>
188
188
:DEFAULT: true */
189
- sendUserEmailVerification: ?boolean ;
189
+ sendUserEmailVerification: ?( boolean | void ) ;
190
190
/* The account lockout policy for failed login attempts. */
191
191
accountLockout: ?AccountLockoutOptions ;
192
192
/* The password policy for enforcing password related rules. */
You can’t perform that action at this time.
0 commit comments