/// <summary>
        /// Translate the unit into TypeScript.
        /// </summary>
        /// <returns></returns>
        public string Translate()
        {
            FormatWriter writer = new FormatWriter()
            {
                Formatter = this.Formatter
            };

            if (this.hasGet)
            {
                // Opening declaration: [<visibility>] get <name>() : <type> {
                // TODO: Handle case of no visibility specified
                writer.WriteLine("{0}{1} {2}{3} {4} {5} {6}",
                                 this.Visibility.ConvertToTypeScriptEquivalent().EmitOptionalVisibility(),
                                 Lexems.GetKeyword,
                                 this.Name.Translate(),
                                 Lexems.OpenRoundBracket + Lexems.CloseRoundBracket,
                                 Lexems.Colon,
                                 this.type.Translate(),
                                 Lexems.OpenCurlyBracket);

                writer.WriteLine("{0}",
                                 this.getStatements.Translate());

                // Closing declaration
                writer.WriteLine("{0}", Lexems.CloseCurlyBracket);
            }

            if (this.hasSet)
            {
                var valueParameter = ArgumentDefinitionTranslationUnit.Create(
                    this.type, IdentifierTranslationUnit.Create("value"));

                // Opening declaration: [<visibility>] set <name>(value : <type>) {
                writer.WriteLine("{0}{1} {2}{3}{4}{5} {6}",
                                 this.Visibility.ConvertToTypeScriptEquivalent().EmitOptionalVisibility(),
                                 Lexems.SetKeyword,
                                 this.Name.Translate(),
                                 Lexems.OpenRoundBracket,
                                 valueParameter.Translate(),
                                 Lexems.CloseRoundBracket,
                                 Lexems.OpenCurlyBracket);

                writer.WriteLine("{0}",
                                 this.setStatements.Translate());

                // Closing declaration
                writer.WriteLine("{0}", Lexems.CloseCurlyBracket);
            }

            return(writer.ToString());
        }
 /// <summary>
 /// Copy initializes a new instance of the <see cref="ArgumentDefinitionTranslationUnit"/> class.
 /// </summary>
 /// <param name="other"></param>
 /// <remarks>
 /// For testability.
 /// </remarks>
 public ArgumentDefinitionTranslationUnit(ArgumentDefinitionTranslationUnit other)
 {
     this.variableDeclaration = other.variableDeclaration;
 }