Compare commits
1 Commits
c168df8365
...
0.0.2
Author | SHA1 | Date | |
---|---|---|---|
f4b32f650c |
@ -476,9 +476,12 @@ impl<F: Flavour> Compile for TypeScriptCompiler<F> {
|
||||
for field in definition.fields.iter() {
|
||||
let typ = Self::type_to_typescript_ext(&field.typ);
|
||||
|
||||
let opt = if field.typ.is_optional() { "?" } else { "" };
|
||||
|
||||
f.a1(format!(
|
||||
"public {}: {};",
|
||||
"public {}{}: {};",
|
||||
Self::fix_keyword_name(&field.name),
|
||||
opt,
|
||||
typ
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user