Skip to content

Commit

Permalink
Use declare namespace syntax when possible
Browse files Browse the repository at this point in the history
This resolves cskeppstedt#60
  • Loading branch information
aluanhaddad authored Jun 30, 2016
1 parent ab6cd52 commit 2aae4a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion T4TS/Outputs/ModuleOutputAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ private void BeginModule(TypeScriptModule module)
{
if (Settings.CompatibilityVersion != null && Settings.CompatibilityVersion < new Version(0, 9, 0))
Output.Append("module ");
else
else if (Settings.CompatibilityVersion != null && Settings.CompatibilityVersion < new Version(1, 5, 0))
Output.Append("declare module ");
else
Output.Append("declare namespace ");

Output.Append(module.QualifiedName);
Output.AppendLine(" {");
Expand Down

0 comments on commit 2aae4a3

Please sign in to comment.