From 2aae4a39002c7aab8dde0107ac2f8e73ae20d977 Mon Sep 17 00:00:00 2001 From: Aluan Haddad Date: Thu, 30 Jun 2016 14:07:24 -0400 Subject: [PATCH] Use declare namespace syntax when possible This resolves #60 --- T4TS/Outputs/ModuleOutputAppender.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/T4TS/Outputs/ModuleOutputAppender.cs b/T4TS/Outputs/ModuleOutputAppender.cs index e2e3c78..f83c977 100644 --- a/T4TS/Outputs/ModuleOutputAppender.cs +++ b/T4TS/Outputs/ModuleOutputAppender.cs @@ -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(" {");