Пример #1
0
        public virtual void WriteProperty(StringBuilder result, TsProperty property)
        {
            result.Append("        ");

            if (property.IsStatic)
            {
                result.Append("static ");
            }

            result.Append(property.Name);

            if (!string.IsNullOrEmpty(property.Type))
            {
                result.Append($": {GetTypescriptType(property)}");
            }

            if (property.Value != null)
            {
                result.Append($" = {GetValueString(property.Value)}");
            }

            result.Append($"{(property.TsType.Type == "enum" ? "," : ";")}\r\n");
        }
Пример #2
0
 public virtual string GetTypescriptType(TsProperty property)
 {
     return(property.Type);
 }