Skip to content

Commit

Permalink
Add back required
Browse files Browse the repository at this point in the history
  • Loading branch information
bhelx committed Oct 21, 2024
1 parent f1556b5 commit 85eea10
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
22 changes: 18 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"typescript": "^5.3.2"
},
"dependencies": {
"@dylibso/xtp-bindgen": "1.0.0-rc.8",
"@dylibso/xtp-bindgen": "file:///Users/ben/dylibso/xtp-bindgen/",
"ejs": "^3.1.10"
}
}
4 changes: 2 additions & 2 deletions template/src/pdk.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export class <%- schema.name %> {
* <%- formatCommentBlock(p.description) %>
*/
<% } -%>
<%- (p.nullable || toTypeScriptType(p) === 'any') ? null : '// @ts-expect-error TS2564\n' -%>
<%- p.name %><%- p.nullable ? '?' : 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 85eea10

Please sign in to comment.