Skip to content

Commit

Permalink
fix: parser.default() return type
Browse files Browse the repository at this point in the history
  • Loading branch information
BIYUEHU committed Jul 24, 2024
1 parent a909218 commit aa7a414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export abstract class Parser<T> extends Lang implements ParserImpl<T> {
public default(value: T) {
if (getSchemaMeta(this).type) this.setMeta({ default: value as JSONSchema7Type })
this.defaultValue = value
return this.optional()
return this.optional() as Parser<T>
}

/**
Expand Down

0 comments on commit aa7a414

Please sign in to comment.