We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9a172f commit bb869dcCopy full SHA for bb869dc
TS.fsx
@@ -212,7 +212,10 @@ let EmitEnums () =
212
213
let EmitProperties flavor prefix (emitScope: EmitScope) (i: Browser.Interface)=
214
let emitPropertyFromJson (p: ItemsType.Root) =
215
- let readOnlyModifier = if p.Readonly.IsSome && p.Readonly.Value = true && prefix = "" then "readonly " else ""
+ let readOnlyModifier =
216
+ match p.Readonly with
217
+ | Some(true) -> "readonly "
218
+ | _ -> ""
219
Pt.printl "%s%s%s: %s;" prefix readOnlyModifier p.Name.Value p.Type.Value
220
221
let emitProperty (p: Browser.Property) =
0 commit comments