Ejemplo n.º 1
0
        private static string BuildPrefix(TypeScriptWriter writer, string name, string[] extends, string[] implements, string[] decorators)
        {
            if (decorators != null && decorators.Any())
            {
                foreach (var decorator in decorators)
                {
                    writer.WriteLine($"@{decorator}");
                    writer.WriteIndent();
                }
            }

            writer.Write($"class {name}");

            if (extends != null && extends.Length > 0)
            {
                writer.Write($" extends {string.Join(", ", extends)}");
            }

            if (implements != null && implements.Length > 0)
            {
                writer.Write($" implements {string.Join(", ", implements)}");
            }

            writer.Write(" ");

            return(null);
        }
Ejemplo n.º 2
0
        private static string BuildPrefix(TypeScriptWriter writer, string name, string[] extends)
        {
            writer.Write($"interface {name}");

            if (extends != null && extends.Length > 0)
            {
                writer.Write($" extends {string.Join(", ", extends)}");
            }

            writer.Write(" ");

            return(null);
        }