Skip to content

Commit

Permalink
typescript-fetch: Move parenthesis to correct place (#18075)
Browse files Browse the repository at this point in the history
A misplaced parenthesis let to a syntax error when generating the code for a nullable set in the FromJSONTyped function. By moving the parenthesis to the correct place the syntax error was resolved.
  • Loading branch information
shirin175 authored Mar 21, 2024
1 parent a4508f6 commit 1bfe800
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
{{^isPrimitiveType}}
{{#isArray}}
{{#uniqueItems}}
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}{{#required}}({{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}new Set((json['{{baseName}}'] as Array<any>).map({{#items}}{{datatype}}{{/items}}FromJSON))),
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}new Set((json['{{baseName}}'] as Array<any>).map({{#items}}{{datatype}}{{/items}}FromJSON))),
{{/uniqueItems}}
{{^uniqueItems}}
'{{name}}': {{^required}}json['{{baseName}}'] == null ? undefined : {{/required}}({{#required}}{{#isNullable}}json['{{baseName}}'] == null ? null : {{/isNullable}}{{/required}}(json['{{baseName}}'] as Array<any>).map({{#items}}{{datatype}}{{/items}}FromJSON)),
Expand Down

0 comments on commit 1bfe800

Please sign in to comment.