We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe2a647 commit e26cd35Copy full SHA for e26cd35
schema_salad/typescript_codegen.py
@@ -495,14 +495,22 @@ def declare_field(
495
doc_str=doc_to_doc_string(doc, indent_level=1)
496
)
497
498
- f.write(
499
- " {safename}{optionalstring}: {type}\n".format(
500
- safename=safename,
501
- type=fieldtype.instance_type,
502
- optionalstring=optionalstring,
+ if fieldname == "class":
+ f.write(
+ " {safename}{optionalstring}: {type}\n".format(
+ safename=safename,
+ type=fieldtype.instance_type,
503
+ optionalstring="?",
504
+ )
505
506
+ else:
507
508
509
510
511
+ optionalstring=optionalstring,
512
513
- )
-
514
if self.current_class_is_abstract:
515
return
516
0 commit comments