diff --git a/NuGet/BundleTransformer.TypeScript/BundleTransformer.TypeScript.nuspec b/NuGet/BundleTransformer.TypeScript/BundleTransformer.TypeScript.nuspec
index 6ccd25cfe..74bd984b4 100644
--- a/NuGet/BundleTransformer.TypeScript/BundleTransformer.TypeScript.nuspec
+++ b/NuGet/BundleTransformer.TypeScript/BundleTransformer.TypeScript.nuspec
@@ -16,7 +16,8 @@ BundleTransformer.TypeScript does not support external modules (CommonJS, AMD, S
As a JS engine is used the JavaScript Engine Switcher library (https://github.com/Taritsyn/JavaScriptEngineSwitcher). For correct working of this module, you need to install one of the following NuGet packages: JavaScriptEngineSwitcher.Msie, JavaScriptEngineSwitcher.V8 or JavaScriptEngineSwitcher.ChakraCore.
BundleTransformer.TypeScript contains one translator-adapter - `TypeScriptTranslator` (supports the TypeScript version 2.4 RTM). This adapter makes translation of TypeScript code to JS code. Also contains the `TypeScriptAssetHandler` debugging HTTP handler, which is responsible for text output of translated TypeScript asset.
- Added support of TypeScript version 2.4 RTM (please note: The 2.4 RTM release is also called '2.4.1').
+ 1. Added support of TypeScript version 2.4 RTM (please note: The 2.4 RTM release is also called '2.4.1');
+2. In configuration settings of TypeScript translator was added one new property - `NoStrictGenericChecks` (default `false`).
Copyright (c) 2012-2017 Andrey Taritsyn - http://www.taritsyn.ru
en-US
BundleTransformer System.Web.Optimization IBundleTransform ASP.NET JavaScript JS Bundling TypeScript Translation Translator Compilation Compiler
diff --git a/NuGet/BundleTransformer.TypeScript/readme.txt b/NuGet/BundleTransformer.TypeScript/readme.txt
index 231c7dde3..0da963738 100644
--- a/NuGet/BundleTransformer.TypeScript/readme.txt
+++ b/NuGet/BundleTransformer.TypeScript/readme.txt
@@ -26,8 +26,10 @@
=============
RELEASE NOTES
=============
- Added support of TypeScript version 2.4 RTM (please note: The 2.4 RTM release is
- also called '2.4.1').
+ 1. Added support of TypeScript version 2.4 RTM (please note: The 2.4 RTM release
+ is also called '2.4.1');
+ 2. In configuration settings of TypeScript translator was added one new
+ property - `NoStrictGenericChecks` (default `false`).
====================
POST-INSTALL ACTIONS
diff --git a/samples/BundleTransformer.Sample.AspNet4.Mvc4/BundleTransformer.Configuration.xsd b/samples/BundleTransformer.Sample.AspNet4.Mvc4/BundleTransformer.Configuration.xsd
index 6e5111312..4370ef006 100644
--- a/samples/BundleTransformer.Sample.AspNet4.Mvc4/BundleTransformer.Configuration.xsd
+++ b/samples/BundleTransformer.Sample.AspNet4.Mvc4/BundleTransformer.Configuration.xsd
@@ -640,6 +640,11 @@
Flag for whether to do not resolve a script references
+
+
+ Flag for whether to disable strict checking of generic signatures
+
+
Flag for whether to report errors on unused locals
diff --git a/samples/BundleTransformer.Sample.AspNet4.Mvc4/Web.config b/samples/BundleTransformer.Sample.AspNet4.Mvc4/Web.config
index 7656e9b37..9ace80021 100644
--- a/samples/BundleTransformer.Sample.AspNet4.Mvc4/Web.config
+++ b/samples/BundleTransformer.Sample.AspNet4.Mvc4/Web.config
@@ -161,7 +161,8 @@
newLine="CrLf" noEmit="false" noEmitHelpers="false"
noEmitOnError="false" noErrorTruncation="false" noFallthroughCasesInSwitch="false"
noImplicitAny="false" noImplicitReturns="false" noImplicitThis="false"
- noLib="false" noResolve="false" noUnusedLocals="false" noUnusedParameters="false"
+ noLib="false" noResolve="false" noStrictGenericChecks="false"
+ noUnusedLocals="false" noUnusedParameters="false"
preserveConstEnums="false" removeComments="false"
skipDefaultLibCheck="false" skipLibCheck="false"
strictNullChecks="false" stripInternal="false"
diff --git a/src/BundleTransformer.TypeScript/Configuration/TypeScriptSettings.cs b/src/BundleTransformer.TypeScript/Configuration/TypeScriptSettings.cs
index 93e5e075c..d379dfd5e 100644
--- a/src/BundleTransformer.TypeScript/Configuration/TypeScriptSettings.cs
+++ b/src/BundleTransformer.TypeScript/Configuration/TypeScriptSettings.cs
@@ -184,6 +184,17 @@ public bool NoResolve
set { this["noResolve"] = value; }
}
+ ///
+ /// Gets or sets a flag for whether to disable strict checking of generic signatures
+ /// in function types
+ ///
+ [ConfigurationProperty("noStrictGenericChecks", DefaultValue = false)]
+ public bool NoStrictGenericChecks
+ {
+ get { return (bool)this["noStrictGenericChecks"]; }
+ set { this["noStrictGenericChecks"] = value; }
+ }
+
///
/// Gets or sets a flag for whether to report errors on unused locals
///
diff --git a/src/BundleTransformer.TypeScript/Internal/CompilationOptions.cs b/src/BundleTransformer.TypeScript/Internal/CompilationOptions.cs
index 1322e60e5..4003ebf07 100644
--- a/src/BundleTransformer.TypeScript/Internal/CompilationOptions.cs
+++ b/src/BundleTransformer.TypeScript/Internal/CompilationOptions.cs
@@ -167,6 +167,16 @@ public bool NoResolve
set;
}
+ ///
+ /// Gets or sets a flag for whether to disable strict checking of generic signatures
+ /// in function types
+ ///
+ public bool NoStrictGenericChecks
+ {
+ get;
+ set;
+ }
+
///
/// Gets or sets a flag for whether to report errors on unused locals
///
@@ -311,6 +321,7 @@ public CompilationOptions()
NoImplicitThis = false;
NoLib = false;
NoResolve = false;
+ NoStrictGenericChecks = false;
NoUnusedLocals = false;
NoUnusedParameters = false;
PreserveConstEnums = false;
diff --git a/src/BundleTransformer.TypeScript/Internal/TypeScriptCompiler.cs b/src/BundleTransformer.TypeScript/Internal/TypeScriptCompiler.cs
index 2eadfa914..25b9ac826 100644
--- a/src/BundleTransformer.TypeScript/Internal/TypeScriptCompiler.cs
+++ b/src/BundleTransformer.TypeScript/Internal/TypeScriptCompiler.cs
@@ -165,6 +165,7 @@ private static JObject ConvertCompilationOptionsToJson(CompilationOptions option
new JProperty("noImplicitThis", options.NoImplicitThis),
new JProperty("noLib", options.NoLib),
new JProperty("noResolve", options.NoResolve),
+ new JProperty("noStrictGenericChecks", options.NoStrictGenericChecks),
new JProperty("noUnusedLocals", options.NoUnusedLocals),
new JProperty("noUnusedParameters", options.NoUnusedParameters),
new JProperty("preserveConstEnums", options.PreserveConstEnums),
diff --git a/src/BundleTransformer.TypeScript/Translators/TypeScriptTranslator.cs b/src/BundleTransformer.TypeScript/Translators/TypeScriptTranslator.cs
index 60acf6eda..151959e33 100644
--- a/src/BundleTransformer.TypeScript/Translators/TypeScriptTranslator.cs
+++ b/src/BundleTransformer.TypeScript/Translators/TypeScriptTranslator.cs
@@ -209,6 +209,16 @@ public bool NoResolve
set;
}
+ ///
+ /// Gets or sets a flag for whether to disable strict checking of generic signatures
+ /// in function types
+ ///
+ public bool NoStrictGenericChecks
+ {
+ get;
+ set;
+ }
+
///
/// Gets or sets a flag for whether to report errors on unused locals
///
@@ -373,6 +383,7 @@ public TypeScriptTranslator(Func createJsEngineInstance,
NoImplicitThis = tsConfig.NoImplicitThis;
NoLib = tsConfig.NoLib;
NoResolve = tsConfig.NoResolve;
+ NoStrictGenericChecks = tsConfig.NoStrictGenericChecks;
NoUnusedLocals = tsConfig.NoUnusedLocals;
NoUnusedParameters = tsConfig.NoUnusedParameters;
PreserveConstEnums = tsConfig.PreserveConstEnums;
@@ -523,6 +534,7 @@ private CompilationOptions CreateCompilationOptions()
NoImplicitThis = NoImplicitThis,
NoLib = NoLib,
NoResolve = NoResolve,
+ NoStrictGenericChecks = NoStrictGenericChecks,
NoUnusedLocals = NoUnusedLocals,
NoUnusedParameters = NoUnusedParameters,
PreserveConstEnums = PreserveConstEnums,