public override void WriteTypescript(TsOutputer outputter) { base.GetTypescriptComment(outputter); outputter.AppendLine("declare namespace " + DisplayText + " {"); outputter.IncreaseIndent(); base.WriteTypescript(outputter); outputter.DecreaseIndent(); outputter.AppendLine("}"); outputter.OutputBuilder.AppendLine(); }
public override void WriteTypescript(TsOutputer outputter) { if (Children.Count > 0 || IsReferenced) { base.GetTypescriptComment(outputter); outputter.AppendLine("interface " + DisplayText + GetInterfaceExtensionString() + " {"); outputter.IncreaseIndent(); base.WriteTypescript(outputter); outputter.DecreaseIndent(); outputter.AppendLine("}"); outputter.OutputBuilder.AppendLine(); } }
public virtual void GetTypescriptComment(TsOutputer outputter) { if (string.IsNullOrEmpty(Summary)) { return; } outputter.AppendLine("/** " + Summary.Trim() + " */"); }
public override void WriteTypescript(TsOutputer outputter) { base.GetTypescriptComment(outputter); // TODO: const? outputter.AppendLine("enum " + DisplayText + " {"); outputter.IncreaseIndent(); base.WriteTypescript(outputter); // remove last comma int index = outputter.OutputBuilder.Length - 1; while (char.IsWhiteSpace(outputter.OutputBuilder[index])) { index--; } if (outputter.OutputBuilder[index] == ',') { outputter.OutputBuilder.Remove(index, 1); } outputter.DecreaseIndent(); outputter.AppendLine("}"); }
public override void WriteTypescript(TsOutputer outputter) { base.GetTypescriptComment(outputter); outputter.AppendLine(this.DisplayText + GetValueString() + ","); }