Skip to content

Commit

Permalink
chore: delete the extra object expand
Browse files Browse the repository at this point in the history
  • Loading branch information
ron0115 committed Jul 28, 2021
1 parent 50f2221 commit 8b5358f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,7 @@ export class Parser {
ts.TypeFlags.Undefined)
))
) {
let value = propType.types.map(type => ({
...this.getInfoFromUnionType(type)
}));
let value = propType.types.map(type => this.getInfoFromUnionType(type));

if (this.shouldRemoveUndefinedFromOptional && !isRequired) {
value = value.filter(option => option.value != 'undefined');
Expand Down

0 comments on commit 8b5358f

Please sign in to comment.