From 04e5fa68ee36c7f1393ce2e5a300677b10a6da29 Mon Sep 17 00:00:00 2001 From: Taritsyn Date: Sat, 11 Sep 2021 21:35:38 +0300 Subject: [PATCH] In BundleTransformer.TypeScript updated descriptions of configuration properties of the TypeScript translator --- .../BundleTransformer.Configuration.xsd | 76 ++++++------ .../Configuration/TypeScriptSettings.cs | 112 +++++++++--------- .../Internal/CompilationOptions.cs | 112 +++++++++--------- .../Translators/TypeScriptTranslator.cs | 112 +++++++++--------- 4 files changed, 203 insertions(+), 209 deletions(-) diff --git a/samples/BundleTransformer.Sample.AspNet45.Mvc4/BundleTransformer.Configuration.xsd b/samples/BundleTransformer.Sample.AspNet45.Mvc4/BundleTransformer.Configuration.xsd index 437ba6a0..1c89a46e 100644 --- a/samples/BundleTransformer.Sample.AspNet45.Mvc4/BundleTransformer.Configuration.xsd +++ b/samples/BundleTransformer.Sample.AspNet45.Mvc4/BundleTransformer.Configuration.xsd @@ -584,22 +584,22 @@ - Flag for whether to do not report errors on unreachable code + Flag for whether to disable error reporting for unreachable code - Flag for whether to do not report errors on unused labels + Flag for whether to disable error reporting for unused labels - Flag for whether to parse in strict mode and emit `use strict` for each source file + Flag for whether to ensure `use strict` is always emitted - Flag for whether to provide full support for iterables in `for-of`, spread, and destructuring when targeting 'ES5' or 'ES3' + Flag for whether to emit more compliant, but verbose and less performant JavaScript for iteration @@ -609,17 +609,17 @@ - Flag for whether to disallow inconsistently-cased references to the same file + Flag for whether to ensure that casing is correct in imports - Flag for whether to resolve `keyof` to string valued property names only (no numbers or symbols) + Flag for whether to make keyof only return strings instead of string, numbers or symbols. Legacy option. - End of line sequence, that used when emitting files: 'CRLF' (dos) or 'LF' (unix) + Newline character for emitting files @@ -630,67 +630,67 @@ - Flag for whether to do not emit outputs + Flag for whether to disable emitting files from a compilation - Flag for whether to do not emit helpers (e.g. `__extends` function) + Flag for whether to disable generating custom helper functions like `__extends` in compiled output - Flag for whether to do not emit outputs if any errors were reported + Flag for whether to disable emitting files if any type checking errors are reported - Flag for whether to do not truncate type name in error messages + Flag for whether to disable truncating types in error messages - Flag for whether to report errors for fallthrough cases in switch statement + Flag for whether to enable error reporting for fallthrough cases in switch statements - Flag for whether to raise error on expressions and declarations with an implied `any` type + Flag for whether to enable error reporting for expressions and declarations with an implied `any` type - Flag for whether to ensure overriding members in derived classes are marked with an `override` modifier + Flag for whether to ensure overriding members in derived classes are marked with an override modifier - Flag for whether to report error when not all code paths in function return a value + Flag for whether to enable error reporting for codepaths that do not explicitly return in a function - Flag for whether to raise error on `this` expressions with an implied `any` type + Flag for whether to enable error reporting when `this` is given the type `any` - Flag for whether to do not include a default library (`lib.d.ts` or `lib.es6.d.ts`) + Flag for whether to disable including any library files, including the default `lib.d.ts` - Flag for whether to require undeclared properties from index signatures to use + Flag for whether to enforce using indexed accessors for keys declared using an indexed type - Flag for whether to do not resolve a script references + Flag for whether to disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project - Flag for whether to disable strict checking of generic signatures + Flag for whether to disable strict checking of generic signatures in function types @@ -700,77 +700,77 @@ - Flag for whether to report errors on unused locals + Flag for whether to enable error reporting when a local variables aren't read - Flag for whether to report errors on unused parameters + Flag for whether to raise an error when a function parameter isn't read - Flag for whether to do not erase const enum declarations in generated code + Flag for whether to disable erasing `const enum` declarations in generated code - Flag for whether to do not emit comments to output + Flag for whether to disable emitting comments - Flag for whether to skip a default library checking + Flag for whether to skip type checking `.d.ts` files that are included with TypeScript - Flag for whether to skip type checking of declaration files + Flag for whether to skip type checking all `.d.ts` files - Flag for whether to enable strict `bind`, `call` and `apply` methods on functions + Flag for whether to check that the arguments for `bind`, `call`, and `apply` methods match the original function - Flag for whether to enable strict null checks + Flag for whether to take into account `null` and `undefined` when type checking - Flag for whether to enable strict checking of function types + Flag for whether to check to ensure parameters and the return values are subtype-compatible when assigning functions - Flag for whether to enable strict checking of property initialization in classes + Flag for whether to check for class properties that are declared but not set in the constructor - Flag for whether to do not emit declarations for code that has an `@internal` annotation + Flag for whether to disable emitting declarations that have `@internal` in their JSDoc comments - Flag for whether to suppress excess property checks for object literals + Flag for whether to disable reporting of excess property errors during the creation of object literals - Flag for whether to suppress noImplicitAny errors for indexing objects lacking index signatures + Flag for whether to suppress `noImplicitAny` errors when indexing objects that lack index signatures - Flag for whether to suppress type checking errors + Flag for whether to suppress type checking errors. Non-standard option. - ECMAScript target version: `EcmaScript3` (default), `EcmaScript5`, `EcmaScript2015`, `EcmaScript2016`, `EcmaScript2017`, `EcmaScript2018`, `EcmaScript2019`, `EcmaScript2020`, `EcmaScript2021` or `EcmaScriptNext` + JavaScript language version for emitted JavaScript and include compatible library declarations @@ -790,12 +790,12 @@ - Flag for whether to run TypeScript to JS transpilation only (skip other passes) + Flag for whether to run TypeScript to JS transpilation only (skip other passes). Non-standard option. - Flag for whether to emit class fields with `Define` instead of `Set`. + Flag for whether to emit ECMAScript-standard-compliant class fields @@ -807,7 +807,7 @@ - Collection of registered library files + Collection of bundled library declaration files that describe the target runtime environment diff --git a/src/BundleTransformer.TypeScript/Configuration/TypeScriptSettings.cs b/src/BundleTransformer.TypeScript/Configuration/TypeScriptSettings.cs index af13aaf8..3803e71a 100644 --- a/src/BundleTransformer.TypeScript/Configuration/TypeScriptSettings.cs +++ b/src/BundleTransformer.TypeScript/Configuration/TypeScriptSettings.cs @@ -10,7 +10,7 @@ namespace BundleTransformer.TypeScript.Configuration public sealed class TypeScriptSettings : ConfigurationSection { /// - /// Gets or sets a flag for whether to do not report errors on unreachable code + /// Gets or sets a flag for whether to disable error reporting for unreachable code /// [ConfigurationProperty("allowUnreachableCode", DefaultValue = false)] public bool AllowUnreachableCode @@ -20,7 +20,7 @@ public bool AllowUnreachableCode } /// - /// Gets or sets a flag for whether to do not report errors on unused labels + /// Gets or sets a flag for whether to disable error reporting for unused labels /// [ConfigurationProperty("allowUnusedLabels", DefaultValue = false)] public bool AllowUnusedLabels @@ -30,8 +30,7 @@ public bool AllowUnusedLabels } /// - /// Gets or sets a flag for whether to parse in strict mode and emit - /// use strict for each source file + /// Gets or sets a flag for whether to ensure use strict is always emitted /// [ConfigurationProperty("alwaysStrict", DefaultValue = false)] public bool AlwaysStrict @@ -41,8 +40,8 @@ public bool AlwaysStrict } /// - /// Gets or sets a flag for whether to provide full support for iterables in for-of, - /// spread, and destructuring when targeting 'ES5' or 'ES3' + /// Gets or sets a flag for whether to emit more compliant, but verbose and less performant JavaScript for + /// iteration /// [ConfigurationProperty("downlevelIteration", DefaultValue = false)] public bool DownlevelIteration @@ -63,7 +62,7 @@ public bool ExactOptionalPropertyTypes } /// - /// Gets or sets a flag for whether to disallow inconsistently-cased references to the same file + /// Gets or sets a flag for whether to ensure that casing is correct in imports /// [ConfigurationProperty("forceConsistentCasingInFileNames", DefaultValue = false)] public bool ForceConsistentCasingInFileNames @@ -73,8 +72,8 @@ public bool ForceConsistentCasingInFileNames } /// - /// Gets or sets a flag for whether to resolve keyof to string valued property names - /// only (no numbers or symbols) + /// Gets or sets a flag for whether to make keyof only return strings instead of string, numbers or symbols. + /// Legacy option. /// [ConfigurationProperty("keyofStringsOnly", DefaultValue = false)] public bool KeyofStringsOnly @@ -84,7 +83,7 @@ public bool KeyofStringsOnly } /// - /// Gets a list of library files to be included in the compilation + /// Gets a set of bundled library declaration files that describe the target runtime environment /// [ConfigurationProperty("libs", IsRequired = false)] public LibraryFileRegistrationCollection Libs @@ -93,8 +92,7 @@ public LibraryFileRegistrationCollection Libs } /// - /// Gets or sets a end of line sequence, that used when emitting files: - /// 'CRLF' (dos) or 'LF' (unix) + /// Gets or sets a newline character for emitting files /// [ConfigurationProperty("newLine", DefaultValue = NewLineMode.CrLf)] public NewLineMode NewLine @@ -104,7 +102,7 @@ public NewLineMode NewLine } /// - /// Gets or sets a flag for whether to do not emit outputs + /// Gets or sets a flag for whether to disable emitting files from a compilation /// [ConfigurationProperty("noEmit", DefaultValue = false)] public bool NoEmit @@ -114,7 +112,8 @@ public bool NoEmit } /// - /// Gets or sets a flag for whether to do not emit helpers (e.g. __extends function) + /// Gets or sets a flag for whether to disable generating custom helper functions like __extends in + /// compiled output /// [ConfigurationProperty("noEmitHelpers", DefaultValue = false)] public bool NoEmitHelpers @@ -124,7 +123,7 @@ public bool NoEmitHelpers } /// - /// Gets or sets a flag for whether to do not emit outputs if any errors were reported + /// Gets or sets a flag for whether to disable emitting files if any type checking errors are reported /// [ConfigurationProperty("noEmitOnError", DefaultValue = false)] public bool NoEmitOnError @@ -134,7 +133,7 @@ public bool NoEmitOnError } /// - /// Gets or sets a flag for whether to do not truncate type name in error messages + /// Gets or sets a flag for whether to disable truncating types in error messages /// [ConfigurationProperty("noErrorTruncation", DefaultValue = false)] public bool NoErrorTruncation @@ -144,7 +143,7 @@ public bool NoErrorTruncation } /// - /// Gets or sets a flag for whether to report errors for fallthrough cases in switch statement + /// Gets or sets a flag for whether to enable error reporting for fallthrough cases in switch statements /// [ConfigurationProperty("noFallthroughCasesInSwitch", DefaultValue = false)] public bool NoFallthroughCasesInSwitch @@ -154,8 +153,8 @@ public bool NoFallthroughCasesInSwitch } /// - /// Gets or sets a flag for whether to raise error on expressions and declarations - /// with an implied any type + /// Gets or sets a flag for whether to enable error reporting for expressions and declarations with an implied + /// any type /// [ConfigurationProperty("noImplicitAny", DefaultValue = false)] public bool NoImplicitAny @@ -165,8 +164,8 @@ public bool NoImplicitAny } /// - /// Gets or sets a flag for whether to ensure overriding members in derived classes are marked with an - /// override modifier + /// Gets or sets a flag for whether to ensure overriding members in derived classes are marked with an override + /// modifier /// [ConfigurationProperty("noImplicitOverride", DefaultValue = false)] public bool NoImplicitOverride @@ -176,7 +175,8 @@ public bool NoImplicitOverride } /// - /// Gets or sets a flag for whether to report error when not all code paths in function return a value + /// Gets or sets a flag for whether to enable error reporting for codepaths that do not explicitly return in a + /// function /// [ConfigurationProperty("noImplicitReturns", DefaultValue = false)] public bool NoImplicitReturns @@ -186,8 +186,7 @@ public bool NoImplicitReturns } /// - /// Gets or sets a flag for whether to raise error on this expressions with - /// an implied any type + /// Gets or sets a flag for whether to enable error reporting when this is given the type any /// [ConfigurationProperty("noImplicitThis", DefaultValue = false)] public bool NoImplicitThis @@ -197,8 +196,7 @@ public bool NoImplicitThis } /// - /// Gets or sets a flag for whether to do not include a default library (lib.d.ts - /// or lib.es6.d.ts) + /// Gets or sets a flag for whether to disable including any library files, including the default lib.d.ts /// [ConfigurationProperty("noLib", DefaultValue = false)] public bool NoLib @@ -208,8 +206,7 @@ public bool NoLib } /// - /// Gets or sets a flag for whether to require undeclared properties from index signatures to use - /// element accesses + /// Gets or sets a flag for whether to enforce using indexed accessors for keys declared using an indexed type /// [ConfigurationProperty("noPropertyAccessFromIndexSignature", DefaultValue = false)] public bool NoPropertyAccessFromIndexSignature @@ -219,7 +216,8 @@ public bool NoPropertyAccessFromIndexSignature } /// - /// Gets or sets a flag for whether to do not resolve a script references + /// Gets or sets a flag for whether to disallow imports, requires or <reference>s + /// from expanding the number of files TypeScript should add to a project /// [ConfigurationProperty("noResolve", DefaultValue = false)] public bool NoResolve @@ -229,8 +227,7 @@ public bool NoResolve } /// - /// Gets or sets a flag for whether to disable strict checking of generic signatures - /// in function types + /// Gets or sets a flag for whether to disable strict checking of generic signatures in function types /// [ConfigurationProperty("noStrictGenericChecks", DefaultValue = false)] public bool NoStrictGenericChecks @@ -240,8 +237,7 @@ public bool NoStrictGenericChecks } /// - /// Gets or sets a flag for whether to include undefined in index signature - /// results + /// Gets or sets a flag for whether to include undefined in index signature results /// [ConfigurationProperty("noUncheckedIndexedAccess", DefaultValue = false)] public bool NoUncheckedIndexedAccess @@ -251,7 +247,7 @@ public bool NoUncheckedIndexedAccess } /// - /// Gets or sets a flag for whether to report errors on unused locals + /// Gets or sets a flag for whether to enable error reporting when a local variables aren't read /// [ConfigurationProperty("noUnusedLocals", DefaultValue = false)] public bool NoUnusedLocals @@ -261,7 +257,7 @@ public bool NoUnusedLocals } /// - /// Gets or sets a flag for whether to report errors on unused parameters + /// Gets or sets a flag for whether to raise an error when a function parameter isn't read /// [ConfigurationProperty("noUnusedParameters", DefaultValue = false)] public bool NoUnusedParameters @@ -271,7 +267,7 @@ public bool NoUnusedParameters } /// - /// Gets or sets a flag for whether to do not erase const enum declarations in generated code + /// Gets or sets a flag for whether to disable erasing const enum declarations in generated code /// [ConfigurationProperty("preserveConstEnums", DefaultValue = false)] public bool PreserveConstEnums @@ -281,7 +277,7 @@ public bool PreserveConstEnums } /// - /// Gets or sets a flag for whether to do not emit comments to output + /// Gets or sets a flag for whether to disable emitting comments /// [ConfigurationProperty("removeComments", DefaultValue = false)] public bool RemoveComments @@ -291,7 +287,7 @@ public bool RemoveComments } /// - /// Gets or sets a flag for whether to skip a default library checking + /// Gets or sets a flag for whether to skip type checking .d.ts files that are included with TypeScript /// [ConfigurationProperty("skipDefaultLibCheck", DefaultValue = false)] public bool SkipDefaultLibCheck @@ -301,7 +297,7 @@ public bool SkipDefaultLibCheck } /// - /// Gets or sets a flag for whether to skip type checking of declaration files + /// Gets or sets a flag for whether to skip type checking all .d.ts files /// [ConfigurationProperty("skipLibCheck", DefaultValue = false)] public bool SkipLibCheck @@ -311,8 +307,8 @@ public bool SkipLibCheck } /// - /// Gets or sets a flag for whether to enable strict bind, call - /// and apply methods on functions + /// Gets or sets a flag for whether to check that the arguments for bind, call, and apply + /// methods match the original function /// [ConfigurationProperty("strictBindCallApply", DefaultValue = false)] public bool StrictBindCallApply @@ -322,7 +318,7 @@ public bool StrictBindCallApply } /// - /// Gets or sets a flag for whether to enable strict null checks + /// Gets or sets a flag for whether to take into account null and undefined when type checking /// [ConfigurationProperty("strictNullChecks", DefaultValue = false)] public bool StrictNullChecks @@ -332,7 +328,8 @@ public bool StrictNullChecks } /// - /// Gets or sets a flag for whether to enable strict checking of function types + /// Gets or sets a flag for whether to check to ensure parameters and the return values are subtype-compatible + /// when assigning functions /// [ConfigurationProperty("strictFunctionTypes", DefaultValue = false)] public bool StrictFunctionTypes @@ -342,8 +339,8 @@ public bool StrictFunctionTypes } /// - /// Gets or sets a flag for whether to enable strict checking of property - /// initialization in classes + /// Gets or sets a flag for whether to check for class properties that are declared but not set in the + /// constructor /// [ConfigurationProperty("strictPropertyInitialization", DefaultValue = false)] public bool StrictPropertyInitialization @@ -353,8 +350,8 @@ public bool StrictPropertyInitialization } /// - /// Gets or sets a flag for whether to do not emit declarations for code that has an - /// @internal annotation + /// Gets or sets a flag for whether to disable emitting declarations that have @internal in their JSDoc + /// comments /// [ConfigurationProperty("stripInternal", DefaultValue = false)] public bool StripInternal @@ -364,7 +361,8 @@ public bool StripInternal } /// - /// Gets or sets a flag for whether to suppress excess property checks for object literals + /// Gets or sets a flag for whether to disable reporting of excess property errors during the creation of + /// object literals /// [ConfigurationProperty("suppressExcessPropertyErrors", DefaultValue = false)] public bool SuppressExcessPropertyErrors @@ -374,8 +372,8 @@ public bool SuppressExcessPropertyErrors } /// - /// Gets or sets a flag for whether to suppress noImplicitAny errors for indexing objects lacking - /// index signatures + /// Gets or sets a flag for whether to suppress errors when indexing objects that + /// lack index signatures /// [ConfigurationProperty("suppressImplicitAnyIndexErrors", DefaultValue = false)] public bool SuppressImplicitAnyIndexErrors @@ -385,7 +383,8 @@ public bool SuppressImplicitAnyIndexErrors } /// - /// Gets or sets a flag for whether to suppress type checking errors + /// Gets or sets a flag for whether to suppress type checking errors. + /// Non-standard option. /// [ConfigurationProperty("suppressTypeCheckingErrors", DefaultValue = false)] public bool SuppressTypeCheckingErrors @@ -395,9 +394,8 @@ public bool SuppressTypeCheckingErrors } /// - /// Gets or sets a ECMAScript target version: `EcmaScript3` (default), `EcmaScript5`, - /// `EcmaScript2015`, `EcmaScript2016`, `EcmaScript2017`, `EcmaScript2018`, `EcmaScript2019`, - /// `EcmaScript2020`, `EcmaScript2021` or `EcmaScriptNext` + /// Gets or sets a JavaScript language version for emitted JavaScript and include compatible library + /// declarations /// [ConfigurationProperty("target", DefaultValue = TargetMode.EcmaScript3)] public TargetMode Target @@ -407,8 +405,8 @@ public TargetMode Target } /// - /// Gets or sets a flag for whether to run TypeScript to JS transpilation - /// only (skip other passes) + /// Gets or sets a flag for whether to run TypeScript to JS transpilation only (skip other passes). + /// Non-standard option. /// [ConfigurationProperty("transpileOnly", DefaultValue = false)] public bool TranspileOnly @@ -418,7 +416,7 @@ public bool TranspileOnly } /// - /// Gets or sets a flag for whether to emit class fields with Define instead of Set + /// Gets or sets a flag for whether to emit ECMAScript-standard-compliant class fields /// [ConfigurationProperty("useDefineForClassFields", DefaultValue = false)] public bool UseDefineForClassFields diff --git a/src/BundleTransformer.TypeScript/Internal/CompilationOptions.cs b/src/BundleTransformer.TypeScript/Internal/CompilationOptions.cs index 7c7204ef..b80c5831 100644 --- a/src/BundleTransformer.TypeScript/Internal/CompilationOptions.cs +++ b/src/BundleTransformer.TypeScript/Internal/CompilationOptions.cs @@ -8,7 +8,7 @@ namespace BundleTransformer.TypeScript.Internal internal sealed class CompilationOptions { /// - /// Gets or sets a flag for whether to do not report errors on unreachable code + /// Gets or sets a flag for whether to disable error reporting for unreachable code /// public bool AllowUnreachableCode { @@ -17,7 +17,7 @@ public bool AllowUnreachableCode } /// - /// Gets or sets a flag for whether to do not report errors on unused labels + /// Gets or sets a flag for whether to disable error reporting for unused labels /// public bool AllowUnusedLabels { @@ -26,8 +26,7 @@ public bool AllowUnusedLabels } /// - /// Gets or sets a flag for whether to parse in strict mode and emit - /// use strict for each source file + /// Gets or sets a flag for whether to ensure use strict is always emitted /// public bool AlwaysStrict { @@ -36,8 +35,8 @@ public bool AlwaysStrict } /// - /// Gets or sets a flag for whether to provide full support for iterables in for-of, - /// spread, and destructuring when targeting 'ES5' or 'ES3' + /// Gets or sets a flag for whether to emit more compliant, but verbose and less performant JavaScript for + /// iteration /// public bool DownlevelIteration { @@ -56,7 +55,7 @@ public bool ExactOptionalPropertyTypes } /// - /// Gets or sets a flag for whether to disallow inconsistently-cased references to the same file + /// Gets or sets a flag for whether to ensure that casing is correct in imports /// public bool ForceConsistentCasingInFileNames { @@ -65,8 +64,8 @@ public bool ForceConsistentCasingInFileNames } /// - /// Gets or sets a flag for whether to resolve keyof to string valued property names - /// only (no numbers or symbols) + /// Gets or sets a flag for whether to make keyof only return strings instead of string, numbers or symbols. + /// Legacy option. /// public bool KeyofStringsOnly { @@ -75,7 +74,7 @@ public bool KeyofStringsOnly } /// - /// Gets a list of library file names to be included in the compilation + /// Gets a set of bundled library declaration files that describe the target runtime environment /// public IList Libs { @@ -84,8 +83,7 @@ public IList Libs } /// - /// Gets or sets a end of line sequence, that used when emitting files: - /// 'CRLF' (dos) or 'LF' (unix) + /// Gets or sets a newline character for emitting files /// public NewLineMode NewLine { @@ -94,7 +92,7 @@ public NewLineMode NewLine } /// - /// Gets or sets a flag for whether to do not emit outputs + /// Gets or sets a flag for whether to disable emitting files from a compilation /// public bool NoEmit { @@ -103,7 +101,8 @@ public bool NoEmit } /// - /// Gets or sets a flag for whether to do not emit helpers (e.g. __extends function) + /// Gets or sets a flag for whether to disable generating custom helper functions like __extends in + /// compiled output /// public bool NoEmitHelpers { @@ -112,7 +111,7 @@ public bool NoEmitHelpers } /// - /// Gets or sets a flag for whether to do not emit outputs if any errors were reported + /// Gets or sets a flag for whether to disable emitting files if any type checking errors are reported /// public bool NoEmitOnError { @@ -121,7 +120,7 @@ public bool NoEmitOnError } /// - /// Gets or sets a flag for whether to do not truncate type name in error messages + /// Gets or sets a flag for whether to disable truncating types in error messages /// public bool NoErrorTruncation { @@ -131,7 +130,7 @@ public bool NoErrorTruncation /// - /// Gets or sets a flag for whether to report errors for fallthrough cases in switch statement + /// Gets or sets a flag for whether to enable error reporting for fallthrough cases in switch statements /// public bool NoFallthroughCasesInSwitch { @@ -140,8 +139,8 @@ public bool NoFallthroughCasesInSwitch } /// - /// Gets or sets a flag for whether to raise error on expressions and declarations - /// with an implied any type + /// Gets or sets a flag for whether to enable error reporting for expressions and declarations with an implied + /// any type /// public bool NoImplicitAny { @@ -150,8 +149,8 @@ public bool NoImplicitAny } /// - /// Gets or sets a flag for whether to ensure overriding members in derived classes are marked with an - /// override modifier + /// Gets or sets a flag for whether to ensure overriding members in derived classes are marked with an override + /// modifier /// public bool NoImplicitOverride { @@ -160,7 +159,8 @@ public bool NoImplicitOverride } /// - /// Gets or sets a flag for whether to report error when not all code paths in function return a value + /// Gets or sets a flag for whether to enable error reporting for codepaths that do not explicitly return in a + /// function /// public bool NoImplicitReturns { @@ -169,8 +169,7 @@ public bool NoImplicitReturns } /// - /// Gets or sets a flag for whether to raise error on this expressions with - /// an implied any type + /// Gets or sets a flag for whether to enable error reporting when this is given the type any /// public bool NoImplicitThis { @@ -179,8 +178,7 @@ public bool NoImplicitThis } /// - /// Gets or sets a flag for whether to do not include a default library (lib.d.ts - /// or lib.es6.d.ts) + /// Gets or sets a flag for whether to disable including any library files, including the default lib.d.ts /// public bool NoLib { @@ -189,8 +187,7 @@ public bool NoLib } /// - /// Gets or sets a flag for whether to require undeclared properties from index signatures to use - /// element accesses + /// Gets or sets a flag for whether to enforce using indexed accessors for keys declared using an indexed type /// public bool NoPropertyAccessFromIndexSignature { @@ -199,7 +196,8 @@ public bool NoPropertyAccessFromIndexSignature } /// - /// Gets or sets a flag for whether to do not resolve a script references + /// Gets or sets a flag for whether to disallow imports, requires or <reference>s + /// from expanding the number of files TypeScript should add to a project /// public bool NoResolve { @@ -208,8 +206,7 @@ public bool NoResolve } /// - /// Gets or sets a flag for whether to disable strict checking of generic signatures - /// in function types + /// Gets or sets a flag for whether to disable strict checking of generic signatures in function types /// public bool NoStrictGenericChecks { @@ -218,8 +215,7 @@ public bool NoStrictGenericChecks } /// - /// Gets or sets a flag for whether to include undefined in index signature - /// results + /// Gets or sets a flag for whether to include undefined in index signature results /// public bool NoUncheckedIndexedAccess { @@ -228,7 +224,7 @@ public bool NoUncheckedIndexedAccess } /// - /// Gets or sets a flag for whether to report errors on unused locals + /// Gets or sets a flag for whether to enable error reporting when a local variables aren't read /// public bool NoUnusedLocals { @@ -237,7 +233,7 @@ public bool NoUnusedLocals } /// - /// Gets or sets a flag for whether to report errors on unused parameters + /// Gets or sets a flag for whether to raise an error when a function parameter isn't read /// public bool NoUnusedParameters { @@ -246,7 +242,7 @@ public bool NoUnusedParameters } /// - /// Gets or sets a flag for whether to do not erase const enum declarations in generated code + /// Gets or sets a flag for whether to disable erasing const enum declarations in generated code /// public bool PreserveConstEnums { @@ -255,7 +251,7 @@ public bool PreserveConstEnums } /// - /// Gets or sets a flag for whether to do not emit comments to output + /// Gets or sets a flag for whether to disable emitting comments /// public bool RemoveComments { @@ -264,7 +260,7 @@ public bool RemoveComments } /// - /// Gets or sets a flag for whether to skip a default library checking + /// Gets or sets a flag for whether to skip type checking .d.ts files that are included with TypeScript /// public bool SkipDefaultLibCheck { @@ -273,7 +269,7 @@ public bool SkipDefaultLibCheck } /// - /// Gets or sets a flag for whether to skip type checking of declaration files + /// Gets or sets a flag for whether to skip type checking all .d.ts files /// public bool SkipLibCheck { @@ -282,8 +278,8 @@ public bool SkipLibCheck } /// - /// Gets or sets a flag for whether to enable strict bind, call - /// and apply methods on functions + /// Gets or sets a flag for whether to check that the arguments for bind, call, and apply + /// methods match the original function /// public bool StrictBindCallApply { @@ -292,7 +288,7 @@ public bool StrictBindCallApply } /// - /// Gets or sets a flag for whether to enable strict null checks + /// Gets or sets a flag for whether to take into account null and undefined when type checking /// public bool StrictNullChecks { @@ -301,7 +297,8 @@ public bool StrictNullChecks } /// - /// Gets or sets a flag for whether to enable strict checking of function types + /// Gets or sets a flag for whether to check to ensure parameters and the return values are subtype-compatible + /// when assigning functions /// public bool StrictFunctionTypes { @@ -310,8 +307,8 @@ public bool StrictFunctionTypes } /// - /// Gets or sets a flag for whether to enable strict checking of property - /// initialization in classes + /// Gets or sets a flag for whether to check for class properties that are declared but not set in the + /// constructor /// public bool StrictPropertyInitialization { @@ -320,8 +317,8 @@ public bool StrictPropertyInitialization } /// - /// Gets or sets a flag for whether to do not emit declarations for code that has an - /// @internal annotation + /// Gets or sets a flag for whether to disable emitting declarations that have @internal in their JSDoc + /// comments /// public bool StripInternal { @@ -330,7 +327,8 @@ public bool StripInternal } /// - /// Gets or sets a flag for whether to suppress excess property checks for object literals + /// Gets or sets a flag for whether to disable reporting of excess property errors during the creation of + /// object literals /// public bool SuppressExcessPropertyErrors { @@ -339,8 +337,8 @@ public bool SuppressExcessPropertyErrors } /// - /// Gets or sets a flag for whether to suppress noImplicitAny errors for indexing objects lacking - /// index signatures + /// Gets or sets a flag for whether to suppress errors when indexing objects that + /// lack index signatures /// public bool SuppressImplicitAnyIndexErrors { @@ -349,7 +347,8 @@ public bool SuppressImplicitAnyIndexErrors } /// - /// Gets or sets a flag for whether to suppress type checking errors + /// Gets or sets a flag for whether to suppress type checking errors. + /// Non-standard option. /// public bool SuppressTypeCheckingErrors { @@ -358,9 +357,8 @@ public bool SuppressTypeCheckingErrors } /// - /// Gets or sets a ECMAScript target version: `EcmaScript3` (default), `EcmaScript5`, - /// `EcmaScript2015`, `EcmaScript2016`, `EcmaScript2017`, `EcmaScript2018`, `EcmaScript2019`, - /// `EcmaScript2020`, `EcmaScript2021` or `EcmaScriptNext` + /// Gets or sets a JavaScript language version for emitted JavaScript and include compatible library + /// declarations /// public TargetMode Target { @@ -369,8 +367,8 @@ public TargetMode Target } /// - /// Gets or sets a flag for whether to run TypeScript to JS transpilation - /// only (skip other passes) + /// Gets or sets a flag for whether to run TypeScript to JS transpilation only (skip other passes). + /// Non-standard option. /// public bool TranspileOnly { @@ -379,7 +377,7 @@ public bool TranspileOnly } /// - /// Gets or sets a flag for whether to emit class fields with Define instead of Set + /// Gets or sets a flag for whether to emit ECMAScript-standard-compliant class fields /// public bool UseDefineForClassFields { diff --git a/src/BundleTransformer.TypeScript/Translators/TypeScriptTranslator.cs b/src/BundleTransformer.TypeScript/Translators/TypeScriptTranslator.cs index 38352dd3..30283311 100644 --- a/src/BundleTransformer.TypeScript/Translators/TypeScriptTranslator.cs +++ b/src/BundleTransformer.TypeScript/Translators/TypeScriptTranslator.cs @@ -51,7 +51,7 @@ public bool IsDebugMode } /// - /// Gets or sets a flag for whether to do not report errors on unreachable code + /// Gets or sets a flag for whether to disable error reporting for unreachable code /// public bool AllowUnreachableCode { @@ -60,7 +60,7 @@ public bool AllowUnreachableCode } /// - /// Gets or sets a flag for whether to do not report errors on unused labels + /// Gets or sets a flag for whether to disable error reporting for unused labels /// public bool AllowUnusedLabels { @@ -69,8 +69,7 @@ public bool AllowUnusedLabels } /// - /// Gets or sets a flag for whether to parse in strict mode and emit - /// use strict for each source file + /// Gets or sets a flag for whether to ensure use strict is always emitted /// public bool AlwaysStrict { @@ -79,8 +78,8 @@ public bool AlwaysStrict } /// - /// Gets or sets a flag for whether to provide full support for iterables in for-of, - /// spread, and destructuring when targeting 'ES5' or 'ES3' + /// Gets or sets a flag for whether to emit more compliant, but verbose and less performant JavaScript for + /// iteration /// public bool DownlevelIteration { @@ -99,7 +98,7 @@ public bool ExactOptionalPropertyTypes } /// - /// Gets or sets a flag for whether to disallow inconsistently-cased references to the same file + /// Gets or sets a flag for whether to ensure that casing is correct in imports /// public bool ForceConsistentCasingInFileNames { @@ -108,8 +107,8 @@ public bool ForceConsistentCasingInFileNames } /// - /// Gets or sets a flag for whether to resolve keyof to string valued property names - /// only (no numbers or symbols) + /// Gets or sets a flag for whether to make keyof only return strings instead of string, numbers or symbols. + /// Legacy option. /// public bool KeyofStringsOnly { @@ -118,7 +117,7 @@ public bool KeyofStringsOnly } /// - /// Gets a list of library file names to be included in the compilation + /// Gets a set of bundled library declaration files that describe the target runtime environment /// public IList Libs { @@ -127,8 +126,7 @@ public IList Libs } /// - /// Gets or sets a end of line sequence, that used when emitting files: - /// 'CRLF' (dos) or 'LF' (unix) + /// Gets or sets a newline character for emitting files /// public NewLineMode NewLine { @@ -137,7 +135,7 @@ public NewLineMode NewLine } /// - /// Gets or sets a flag for whether to do not emit outputs + /// Gets or sets a flag for whether to disable emitting files from a compilation /// public bool NoEmit { @@ -146,7 +144,8 @@ public bool NoEmit } /// - /// Gets or sets a flag for whether to do not emit helpers (e.g. __extends function) + /// Gets or sets a flag for whether to disable generating custom helper functions like __extends in + /// compiled output /// public bool NoEmitHelpers { @@ -155,7 +154,7 @@ public bool NoEmitHelpers } /// - /// Gets or sets a flag for whether to do not emit outputs if any errors were reported + /// Gets or sets a flag for whether to disable emitting files if any type checking errors are reported /// public bool NoEmitOnError { @@ -164,7 +163,7 @@ public bool NoEmitOnError } /// - /// Gets or sets a flag for whether to do not truncate type name in error messages + /// Gets or sets a flag for whether to disable truncating types in error messages /// public bool NoErrorTruncation { @@ -173,7 +172,7 @@ public bool NoErrorTruncation } /// - /// Gets or sets a flag for whether to report errors for fallthrough cases in switch statement + /// Gets or sets a flag for whether to enable error reporting for fallthrough cases in switch statements /// public bool NoFallthroughCasesInSwitch { @@ -182,8 +181,8 @@ public bool NoFallthroughCasesInSwitch } /// - /// Gets or sets a flag for whether to raise error on expressions and declarations - /// with an implied any type + /// Gets or sets a flag for whether to enable error reporting for expressions and declarations with an implied + /// any type /// public bool NoImplicitAny { @@ -192,8 +191,8 @@ public bool NoImplicitAny } /// - /// Gets or sets a flag for whether to ensure overriding members in derived classes are marked with an - /// override modifier + /// Gets or sets a flag for whether to ensure overriding members in derived classes are marked with an override + /// modifier /// public bool NoImplicitOverride { @@ -202,7 +201,8 @@ public bool NoImplicitOverride } /// - /// Gets or sets a flag for whether to report error when not all code paths in function return a value + /// Gets or sets a flag for whether to enable error reporting for codepaths that do not explicitly return in a + /// function /// public bool NoImplicitReturns { @@ -211,8 +211,7 @@ public bool NoImplicitReturns } /// - /// Gets or sets a flag for whether to raise error on this expressions with - /// an implied any type + /// Gets or sets a flag for whether to enable error reporting when this is given the type any /// public bool NoImplicitThis { @@ -221,8 +220,7 @@ public bool NoImplicitThis } /// - /// Gets or sets a flag for whether to do not include a default library (lib.d.ts - /// or lib.es6.d.ts) + /// Gets or sets a flag for whether to disable including any library files, including the default lib.d.ts /// public bool NoLib { @@ -231,8 +229,7 @@ public bool NoLib } /// - /// Gets or sets a flag for whether to require undeclared properties from index signatures to use - /// element accesses + /// Gets or sets a flag for whether to enforce using indexed accessors for keys declared using an indexed type /// public bool NoPropertyAccessFromIndexSignature { @@ -241,7 +238,8 @@ public bool NoPropertyAccessFromIndexSignature } /// - /// Gets or sets a flag for whether to do not resolve a script references + /// Gets or sets a flag for whether to disallow imports, requires or <reference>s + /// from expanding the number of files TypeScript should add to a project /// public bool NoResolve { @@ -250,8 +248,7 @@ public bool NoResolve } /// - /// Gets or sets a flag for whether to disable strict checking of generic signatures - /// in function types + /// Gets or sets a flag for whether to disable strict checking of generic signatures in function types /// public bool NoStrictGenericChecks { @@ -260,8 +257,7 @@ public bool NoStrictGenericChecks } /// - /// Gets or sets a flag for whether to include undefined in index signature - /// results + /// Gets or sets a flag for whether to include undefined in index signature results /// public bool NoUncheckedIndexedAccess { @@ -270,7 +266,7 @@ public bool NoUncheckedIndexedAccess } /// - /// Gets or sets a flag for whether to report errors on unused locals + /// Gets or sets a flag for whether to enable error reporting when a local variables aren't read /// public bool NoUnusedLocals { @@ -279,7 +275,7 @@ public bool NoUnusedLocals } /// - /// Gets or sets a flag for whether to report errors on unused parameters + /// Gets or sets a flag for whether to raise an error when a function parameter isn't read /// public bool NoUnusedParameters { @@ -288,7 +284,7 @@ public bool NoUnusedParameters } /// - /// Gets or sets a flag for whether to do not erase const enum declarations in generated code + /// Gets or sets a flag for whether to disable erasing const enum declarations in generated code /// public bool PreserveConstEnums { @@ -297,7 +293,7 @@ public bool PreserveConstEnums } /// - /// Gets or sets a flag for whether to do not emit comments to output + /// Gets or sets a flag for whether to disable emitting comments /// public bool RemoveComments { @@ -306,7 +302,7 @@ public bool RemoveComments } /// - /// Gets or sets a flag for whether to skip a default library checking + /// Gets or sets a flag for whether to skip type checking .d.ts files that are included with TypeScript /// public bool SkipDefaultLibCheck { @@ -315,7 +311,7 @@ public bool SkipDefaultLibCheck } /// - /// Gets or sets a flag for whether to skip type checking of declaration files + /// Gets or sets a flag for whether to skip type checking all .d.ts files /// public bool SkipLibCheck { @@ -324,8 +320,8 @@ public bool SkipLibCheck } /// - /// Gets or sets a flag for whether to enable strict bind, call - /// and apply methods on functions + /// Gets or sets a flag for whether to check that the arguments for bind, call, and apply + /// methods match the original function /// public bool StrictBindCallApply { @@ -334,7 +330,7 @@ public bool StrictBindCallApply } /// - /// Gets or sets a flag for whether to enable strict null checks + /// Gets or sets a flag for whether to take into account null and undefined when type checking /// public bool StrictNullChecks { @@ -343,7 +339,8 @@ public bool StrictNullChecks } /// - /// Gets or sets a flag for whether to enable strict checking of function types + /// Gets or sets a flag for whether to check to ensure parameters and the return values are subtype-compatible + /// when assigning functions /// public bool StrictFunctionTypes { @@ -352,8 +349,8 @@ public bool StrictFunctionTypes } /// - /// Gets or sets a flag for whether to enable strict checking of property - /// initialization in classes + /// Gets or sets a flag for whether to check for class properties that are declared but not set in the + /// constructor /// public bool StrictPropertyInitialization { @@ -362,8 +359,8 @@ public bool StrictPropertyInitialization } /// - /// Gets or sets a flag for whether to do not emit declarations for code that has an - /// @internal annotation + /// Gets or sets a flag for whether to disable emitting declarations that have @internal in their JSDoc + /// comments /// public bool StripInternal { @@ -372,7 +369,8 @@ public bool StripInternal } /// - /// Gets or sets a flag for whether to suppress excess property checks for object literals + /// Gets or sets a flag for whether to disable reporting of excess property errors during the creation of + /// object literals /// public bool SuppressExcessPropertyErrors { @@ -381,8 +379,8 @@ public bool SuppressExcessPropertyErrors } /// - /// Gets or sets a flag for whether to suppress noImplicitAny errors for indexing objects lacking - /// index signatures + /// Gets or sets a flag for whether to suppress errors when indexing objects that + /// lack index signatures /// public bool SuppressImplicitAnyIndexErrors { @@ -391,7 +389,8 @@ public bool SuppressImplicitAnyIndexErrors } /// - /// Gets or sets a flag for whether to suppress type checking errors + /// Gets or sets a flag for whether to suppress type checking errors. + /// Non-standard option. /// public bool SuppressTypeCheckingErrors { @@ -400,9 +399,8 @@ public bool SuppressTypeCheckingErrors } /// - /// Gets or sets a ECMAScript target version: `EcmaScript3` (default), `EcmaScript5`, - /// `EcmaScript2015`, `EcmaScript2016`, `EcmaScript2017`, `EcmaScript2018`, `EcmaScript2019`, - /// `EcmaScript2020`, `EcmaScript2021` or `EcmaScriptNext` + /// Gets or sets a JavaScript language version for emitted JavaScript and include compatible library + /// declarations /// public TargetMode Target { @@ -411,8 +409,8 @@ public TargetMode Target } /// - /// Gets or sets a flag for whether to run TypeScript to JS transpilation - /// only (skip other passes) + /// Gets or sets a flag for whether to run TypeScript to JS transpilation only (skip other passes). + /// Non-standard option. /// public bool TranspileOnly { @@ -421,7 +419,7 @@ public bool TranspileOnly } /// - /// Gets or sets a flag for whether to emit class fields with Define instead of Set + /// Gets or sets a flag for whether to emit ECMAScript-standard-compliant class fields /// public bool UseDefineForClassFields {