Skip to content

Commit

Permalink
moved required up to the property level
Browse files Browse the repository at this point in the history
  • Loading branch information
bhelx committed Nov 1, 2024
1 parent 3529fdc commit 634e02d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/src/pdk.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export class <%- schema.name %> {
* <%- formatCommentBlock(p.description) %>
*/
<% } -%>
<%- (!p.xtpType.required || toTypeScriptType(p) === 'any') ? null : '// @ts-expect-error TS2564\n' -%>
<%- p.name %><%- !p.xtpType.required ? '?' : null %>: <%- toTypeScriptType(p) %>;
<%- (!p.required || toTypeScriptType(p) === 'any') ? null : '// @ts-expect-error TS2564\n' -%>
<%- p.name %><%- !p.required ? '?' : null %>: <%- toTypeScriptType(p) %>;
<% }) %>
static fromJson(obj: any): <%- schema.name %> {
Expand Down

0 comments on commit 634e02d

Please sign in to comment.