瀏覽代碼

Added `tslint-eslint-rules` rules

sanex3339 7 年之前
父節點
當前提交
31fdfae074
共有 100 個文件被更改,包括 785 次插入681 次删除
  1. 3 2
      package.json
  2. 4 4
      src/JavaScriptObfuscator.ts
  3. 10 9
      src/JavaScriptObfuscatorInternal.ts
  4. 2 2
      src/ObfuscationResult.ts
  5. 13 12
      src/Obfuscator.ts
  6. 8 8
      src/SourceMapCorrector.ts
  7. 5 5
      src/cli/JavaScriptObfuscatorCLI.ts
  8. 4 0
      src/cli/sanitizers/BooleanSanitizer.ts
  9. 4 0
      src/cli/sanitizers/SourceMapModeSanitizer.ts
  10. 4 0
      src/cli/sanitizers/StringArrayEncodingSanitizer.ts
  11. 10 9
      src/cli/utils/CLIUtils.ts
  12. 12 12
      src/container/InversifyContainerFacade.ts
  13. 2 2
      src/custom-nodes/AbstractCustomNode.ts
  14. 8 7
      src/custom-nodes/AbstractCustomNodeGroup.ts
  15. 3 3
      src/custom-nodes/console-output-nodes/ConsoleOutputDisableExpressionNode.ts
  16. 7 7
      src/custom-nodes/console-output-nodes/group/ConsoleOutputCustomNodeGroup.ts
  17. 3 3
      src/custom-nodes/control-flow-flattening-nodes/BinaryExpressionFunctionNode.ts
  18. 6 6
      src/custom-nodes/control-flow-flattening-nodes/BlockStatementControlFlowFlatteningNode.ts
  19. 3 3
      src/custom-nodes/control-flow-flattening-nodes/CallExpressionFunctionNode.ts
  20. 3 3
      src/custom-nodes/control-flow-flattening-nodes/LogicalExpressionFunctionNode.ts
  21. 3 3
      src/custom-nodes/control-flow-flattening-nodes/StringLiteralNode.ts
  22. 6 6
      src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/CallExpressionControlFlowStorageCallNode.ts
  23. 3 3
      src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/ControlFlowStorageNode.ts
  24. 6 6
      src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/ExpressionWithOperatorControlFlowStorageCallNode.ts
  25. 4 4
      src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/StringLiteralControlFlowStorageCallNode.ts
  26. 2 2
      src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionCallNode.ts
  27. 2 2
      src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionIntervalNode.ts
  28. 2 2
      src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionNode.ts
  29. 7 7
      src/custom-nodes/debug-protection-nodes/group/DebugProtectionCustomNodeGroup.ts
  30. 4 4
      src/custom-nodes/domain-lock-nodes/DomainLockNode.ts
  31. 7 7
      src/custom-nodes/domain-lock-nodes/group/DomainLockCustomNodeGroup.ts
  32. 3 3
      src/custom-nodes/node-calls-controller-nodes/NodeCallsControllerFunctionNode.ts
  33. 4 4
      src/custom-nodes/self-defending-nodes/SelfDefendingUnicodeNode.ts
  34. 7 7
      src/custom-nodes/self-defending-nodes/group/SelfDefendingCustomNodeGroup.ts
  35. 5 5
      src/custom-nodes/string-array-nodes/StringArrayCallsWrapper.ts
  36. 4 4
      src/custom-nodes/string-array-nodes/StringArrayNode.ts
  37. 6 6
      src/custom-nodes/string-array-nodes/StringArrayRotateFunctionNode.ts
  38. 8 8
      src/custom-nodes/string-array-nodes/group/StringArrayCustomNodeGroup.ts
  39. 3 3
      src/decorators/Initializable.ts
  40. 5 5
      src/node-transformers/AbstractNodeTransformer.ts
  41. 11 11
      src/node-transformers/control-flow-transformers/BlockStatementControlFlowTransformer.ts
  42. 15 15
      src/node-transformers/control-flow-transformers/FunctionControlFlowTransformer.ts
  43. 14 14
      src/node-transformers/control-flow-transformers/control-flow-replacers/AbstractControlFlowReplacer.ts
  44. 7 7
      src/node-transformers/control-flow-transformers/control-flow-replacers/BinaryExpressionControlFlowReplacer.ts
  45. 12 13
      src/node-transformers/control-flow-transformers/control-flow-replacers/CallExpressionControlFlowReplacer.ts
  46. 8 8
      src/node-transformers/control-flow-transformers/control-flow-replacers/ExpressionWithOperatorControlFlowReplacer.ts
  47. 9 9
      src/node-transformers/control-flow-transformers/control-flow-replacers/LogicalExpressionControlFlowReplacer.ts
  48. 10 10
      src/node-transformers/control-flow-transformers/control-flow-replacers/StringLiteralControlFlowReplacer.ts
  49. 5 5
      src/node-transformers/converting-transformers/MemberExpressionTransformer.ts
  50. 5 5
      src/node-transformers/converting-transformers/MethodDefinitionTransformer.ts
  51. 7 7
      src/node-transformers/converting-transformers/TemplateLiteralTransformer.ts
  52. 11 11
      src/node-transformers/dead-code-injection-transformers/DeadCodeInjectionTransformer.ts
  53. 10 10
      src/node-transformers/obfuscating-transformers/CatchClauseTransformer.ts
  54. 12 12
      src/node-transformers/obfuscating-transformers/FunctionDeclarationTransformer.ts
  55. 10 10
      src/node-transformers/obfuscating-transformers/FunctionTransformer.ts
  56. 10 10
      src/node-transformers/obfuscating-transformers/LabeledStatementTransformer.ts
  57. 6 6
      src/node-transformers/obfuscating-transformers/LiteralTransformer.ts
  58. 7 7
      src/node-transformers/obfuscating-transformers/ObjectExpressionTransformer.ts
  59. 12 12
      src/node-transformers/obfuscating-transformers/VariableDeclarationTransformer.ts
  60. 4 4
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/AbstractObfuscatingReplacer.ts
  61. 8 8
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/identifier-obfuscating-replacers/BaseIdentifierObfuscatingReplacer.ts
  62. 3 3
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/BooleanLiteralObfuscatingReplacer.ts
  63. 3 3
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/NumberLiteralObfuscatingReplacer.ts
  64. 25 23
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/StringLiteralObfuscatingReplacer.ts
  65. 29 35
      src/node/Node.ts
  66. 19 18
      src/node/NodeAppender.ts
  67. 25 25
      src/node/NodeUtils.ts
  68. 83 80
      src/node/Nodes.ts
  69. 14 14
      src/options/Options.ts
  70. 1 1
      src/options/OptionsNormalizer.ts
  71. 2 2
      src/options/ValidationErrorsFormatter.ts
  72. 4 0
      src/options/normalizer-rules/ControlFlowFlatteningThresholdRule.ts
  73. 4 0
      src/options/normalizer-rules/DeadCodeInjectionRule.ts
  74. 4 0
      src/options/normalizer-rules/DeadCodeInjectionThresholdRule.ts
  75. 4 0
      src/options/normalizer-rules/DomainLockRule.ts
  76. 4 0
      src/options/normalizer-rules/SelfDefendingRule.ts
  77. 4 0
      src/options/normalizer-rules/SourceMapBaseUrlRule.ts
  78. 4 0
      src/options/normalizer-rules/SourceMapFileNameRule.ts
  79. 4 0
      src/options/normalizer-rules/StringArrayEncodingRule.ts
  80. 4 0
      src/options/normalizer-rules/StringArrayRule.ts
  81. 4 0
      src/options/normalizer-rules/StringArrayThresholdRule.ts
  82. 6 7
      src/stack-trace-analyzer/StackTraceAnalyzer.ts
  83. 3 3
      src/stack-trace-analyzer/callee-data-extractors/AbstractCalleeDataExtractor.ts
  84. 6 6
      src/stack-trace-analyzer/callee-data-extractors/FunctionDeclarationCalleeDataExtractor.ts
  85. 6 6
      src/stack-trace-analyzer/callee-data-extractors/FunctionExpressionCalleeDataExtractor.ts
  86. 11 11
      src/stack-trace-analyzer/callee-data-extractors/ObjectExpressionCalleeDataExtractor.ts
  87. 9 9
      src/storages/ArrayStorage.ts
  88. 10 10
      src/storages/MapStorage.ts
  89. 1 1
      src/storages/control-flow/ControlFlowStorage.ts
  90. 4 4
      src/storages/custom-node-group/CustomNodeGroupStorage.ts
  91. 4 4
      src/storages/string-array/StringArrayStorage.ts
  92. 1 0
      src/templates/custom-nodes/self-defending-nodes/self-defending-unicode-node/SelfDefendingTemplate.ts
  93. 1 0
      src/templates/custom-nodes/string-array-nodes/string-array-calls-wrapper/SelfDefendingTemplate.ts
  94. 1 0
      src/templates/custom-nodes/string-array-nodes/string-array-rotate-function-node/SelfDefendingTemplate.ts
  95. 7 7
      src/utils/ArrayUtils.ts
  96. 10 9
      src/utils/CryptUtils.ts
  97. 2 2
      src/utils/EscapeSequenceEncoder.ts
  98. 10 10
      src/utils/RandomGenerator.ts
  99. 6 6
      src/utils/Utils.ts
  100. 45 0
      tslint.json

+ 3 - 2
package.json

@@ -46,7 +46,7 @@
     "@types/md5": "2.1.32",
     "@types/mkdirp": "0.3.29",
     "@types/mocha": "2.2.41",
-    "@types/node": "8.0.9",
+    "@types/node": "8.0.10",
     "@types/sinon": "2.3.2",
     "@types/string-template": "1.0.2",
     "awesome-typescript-loader": "3.2.1",
@@ -59,9 +59,10 @@
     "istanbul": "1.1.0-alpha.1",
     "mocha": "3.4.2",
     "pre-commit": "1.2.2",
-    "sinon": "2.3.6",
+    "sinon": "2.3.7",
     "ts-node": "3.2.0",
     "tslint": "5.5.0",
+    "tslint-eslint-rules": "^4.1.1",
     "tslint-loader": "3.5.3",
     "typescript": "2.4.1",
     "webpack": "3.1.0",

+ 4 - 4
src/JavaScriptObfuscator.ts

@@ -13,9 +13,9 @@ import { JavaScriptObfuscatorCLI } from './cli/JavaScriptObfuscatorCLI';
 
 export class JavaScriptObfuscator {
     /**
-     * @param sourceCode
-     * @param inputOptions
-     * @returns {string}
+     * @param {string} sourceCode
+     * @param {TInputOptions} inputOptions
+     * @returns {IObfuscationResult}
      */
     public static obfuscate (sourceCode: string, inputOptions: TInputOptions = {}): IObfuscationResult {
         const inversifyContainerFacade: IInversifyContainerFacade = new InversifyContainerFacade();
@@ -32,7 +32,7 @@ export class JavaScriptObfuscator {
     }
 
     /**
-     * @param argv
+     * @param {string[]} argv
      */
     public static runCLI (argv: string[]): void {
         new JavaScriptObfuscatorCLI(argv).run();

+ 10 - 9
src/JavaScriptObfuscatorInternal.ts

@@ -39,9 +39,9 @@ export class JavaScriptObfuscatorInternal implements IJavaScriptObfuscator {
     private readonly sourceMapCorrector: ISourceMapCorrector;
 
     /**
-     * @param obfuscator
-     * @param sourceMapCorrector
-     * @param options
+     * @param {IObfuscator} obfuscator
+     * @param {ISourceMapCorrector} sourceMapCorrector
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IObfuscator) obfuscator: IObfuscator,
@@ -54,7 +54,7 @@ export class JavaScriptObfuscatorInternal implements IJavaScriptObfuscator {
     }
 
     /**
-     * @param sourceCode
+     * @param {string} sourceCode
      * @returns {IObfuscationResult}
      */
     public obfuscate (sourceCode: string): IObfuscationResult {
@@ -71,8 +71,8 @@ export class JavaScriptObfuscatorInternal implements IJavaScriptObfuscator {
     }
 
     /**
-     * @param sourceCode
-     * @return {ESTree.Program}
+     * @param {string} sourceCode
+     * @returns {Program}
      */
     private parseCode (sourceCode: string): ESTree.Program {
         return esprima.parse(sourceCode, {
@@ -81,8 +81,9 @@ export class JavaScriptObfuscatorInternal implements IJavaScriptObfuscator {
     }
 
     /**
-     * @param sourceCode
-     * @param astTree
+     * @param {string} sourceCode
+     * @param {Program} astTree
+     * @returns {IGeneratorOutput}
      */
     private generateCode (sourceCode: string, astTree: ESTree.Program): IGeneratorOutput {
         const escodegenParams: escodegen.GenerateOptions = {
@@ -111,7 +112,7 @@ export class JavaScriptObfuscatorInternal implements IJavaScriptObfuscator {
     }
 
     /**
-     * @param generatorOutput
+     * @param {IGeneratorOutput} generatorOutput
      * @returns {IObfuscationResult}
      */
     private getObfuscationResult (generatorOutput: IGeneratorOutput): IObfuscationResult {

+ 2 - 2
src/ObfuscationResult.ts

@@ -19,8 +19,8 @@ export class ObfuscationResult implements IObfuscationResult {
     private sourceMap: string;
 
     /**
-     * @param obfuscatedCode
-     * @param sourceMap
+     * @param {string} obfuscatedCode
+     * @param {string} sourceMap
      */
     public initialize (obfuscatedCode: string, sourceMap: string): void {
         this.obfuscatedCode = obfuscatedCode;

+ 13 - 12
src/Obfuscator.ts

@@ -89,11 +89,11 @@ export class Obfuscator implements IObfuscator {
     private readonly stackTraceAnalyzer: IStackTraceAnalyzer;
 
     /**
-     * @param stackTraceAnalyzer
-     * @param obfuscationEventEmitter
-     * @param customNodeGroupStorage
-     * @param nodeTransformerFactory
-     * @param options
+     * @param {IStackTraceAnalyzer} stackTraceAnalyzer
+     * @param {IObfuscationEventEmitter} obfuscationEventEmitter
+     * @param {IStorage<ICustomNodeGroup>} customNodeGroupStorage
+     * @param {TNodeTransformerFactory} nodeTransformerFactory
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IStackTraceAnalyzer) stackTraceAnalyzer: IStackTraceAnalyzer,
@@ -110,8 +110,8 @@ export class Obfuscator implements IObfuscator {
     }
 
     /**
-     * @param astTree
-     * @returns {ESTree.Program}
+     * @param {Program} astTree
+     * @returns {Program}
      */
     public obfuscateAstTree (astTree: ESTree.Program): ESTree.Program {
         if (Node.isProgramNode(astTree) && !astTree.body.length) {
@@ -158,8 +158,9 @@ export class Obfuscator implements IObfuscator {
     }
 
     /**
-     * @param astTree
-     * @param nodeTransformers
+     * @param {Program} astTree
+     * @param {NodeTransformer[]} nodeTransformers
+     * @returns {Program}
      */
     private transformAstTree (
         astTree: ESTree.Program,
@@ -196,9 +197,9 @@ export class Obfuscator implements IObfuscator {
     }
 
     /**
-     * @param visitors
-     * @param direction
-     * @return {TVisitorDirection}
+     * @param {IVisitor[]} visitors
+     * @param {TVisitorDirection} direction
+     * @returns {TVisitorFunction}
      */
     private mergeVisitorsForDirection (visitors: IVisitor[], direction: TVisitorDirection): TVisitorFunction {
         if (!visitors.length) {

+ 8 - 8
src/SourceMapCorrector.ts

@@ -28,9 +28,9 @@ export class SourceMapCorrector implements ISourceMapCorrector {
     private readonly options: IOptions;
 
     /**
-     * @param obfuscationResultFactory
-     * @param cryptUtils
-     * @param options
+     * @param {TObfuscationResultFactory} obfuscationResultFactory
+     * @param {ICryptUtils} cryptUtils
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IObfuscationResult) obfuscationResultFactory: TObfuscationResultFactory,
@@ -43,9 +43,9 @@ export class SourceMapCorrector implements ISourceMapCorrector {
     }
 
     /**
-     * @returns {ObfuscationResult}
-     * @param obfuscatedCode
-     * @param sourceMap
+     * @param {string} obfuscatedCode
+     * @param {string} sourceMap
+     * @returns {IObfuscationResult}
      */
     public correct (obfuscatedCode: string, sourceMap: string): IObfuscationResult {
         return this.obfuscationResultFactory(
@@ -55,8 +55,8 @@ export class SourceMapCorrector implements ISourceMapCorrector {
     }
 
     /**
-     * @param obfuscatedCode
-     * @param sourceMap
+     * @param {string} obfuscatedCode
+     * @param {string} sourceMap
      * @returns {string}
      */
     private correctObfuscatedCode (obfuscatedCode: string, sourceMap: string): string {

+ 5 - 5
src/cli/JavaScriptObfuscatorCLI.ts

@@ -41,7 +41,7 @@ export class JavaScriptObfuscatorCLI {
     private sourceCode: string = '';
 
     /**
-     * @param argv
+     * @param {string[]} argv
      */
     constructor (argv: string[]) {
         this.rawArguments = argv;
@@ -234,8 +234,8 @@ export class JavaScriptObfuscatorCLI {
     }
 
     /**
-     * @param outputCodePath
-     * @param options
+     * @param {string} outputCodePath
+     * @param {TInputOptions} options
      */
     private processDataWithoutSourceMap (outputCodePath: string, options: TInputOptions): void {
         const obfuscatedCode: string = JavaScriptObfuscator.obfuscate(this.sourceCode, options).getObfuscatedCode();
@@ -244,8 +244,8 @@ export class JavaScriptObfuscatorCLI {
     }
 
     /**
-     * @param outputCodePath
-     * @param options
+     * @param {string} outputCodePath
+     * @param {TInputOptions} options
      */
     private processDataWithSourceMap (outputCodePath: string, options: TInputOptions): void {
         const outputSourceMapPath: string = CLIUtils.getOutputSourceMapPath(

+ 4 - 0
src/cli/sanitizers/BooleanSanitizer.ts

@@ -1,5 +1,9 @@
 import { TCLISanitizer } from '../../types/cli/TCLISanitizer';
 
+/**
+ * @param {string} value
+ * @returns {boolean}
+ */
 export const BooleanSanitizer: TCLISanitizer = (value: string): boolean => {
     return value === 'true' || value === '1';
 };

+ 4 - 0
src/cli/sanitizers/SourceMapModeSanitizer.ts

@@ -2,6 +2,10 @@ import { TCLISanitizer } from '../../types/cli/TCLISanitizer';
 
 import { SourceMapMode } from '../../enums/SourceMapMode';
 
+/**
+ * @param {string} value
+ * @returns {string}
+ */
 export const SourceMapModeSanitizer: TCLISanitizer = (value: string): string => {
     const availableMode: boolean = Object
         .keys(SourceMapMode)

+ 4 - 0
src/cli/sanitizers/StringArrayEncodingSanitizer.ts

@@ -3,6 +3,10 @@ import { TStringArrayEncoding } from '../../types/options/TStringArrayEncoding';
 
 import { StringArrayEncoding } from '../../enums/StringArrayEncoding';
 
+/**
+ * @param {string} value
+ * @returns {TStringArrayEncoding}
+ */
 export const StringArrayEncodingSanitizer: TCLISanitizer = (value: string): TStringArrayEncoding => {
     switch (value) {
         case 'true':

+ 10 - 9
src/cli/utils/CLIUtils.ts

@@ -18,8 +18,8 @@ export class CLIUtils {
     private static readonly encoding: BufferEncoding = 'utf8';
 
     /**
-     * @param outputPath
-     * @param inputPath
+     * @param {string} outputPath
+     * @param {string} inputPath
      * @returns {string}
      */
     public static getOutputCodePath (outputPath: string, inputPath: string): string {
@@ -36,8 +36,8 @@ export class CLIUtils {
     }
 
     /**
-     * @param outputCodePath
-     * @param sourceMapFileName
+     * @param {string} outputCodePath
+     * @param {string} sourceMapFileName
      * @returns {string}
      */
     public static getOutputSourceMapPath (outputCodePath: string, sourceMapFileName: string = ''): string {
@@ -74,7 +74,8 @@ export class CLIUtils {
     }
 
     /**
-     * @param filePath
+     * @param {string} filePath
+     * @returns {boolean}
      */
     public static isFilePath (filePath: string): boolean {
         try {
@@ -85,7 +86,7 @@ export class CLIUtils {
     }
 
     /**
-     * @param inputPath
+     * @param {string} inputPath
      * @returns {string}
      */
     public static readFile (inputPath: string): string {
@@ -93,7 +94,7 @@ export class CLIUtils {
     }
 
     /**
-     * @param inputPath
+     * @param {string} inputPath
      */
     public static validateInputPath (inputPath: string): void {
         if (!CLIUtils.isFilePath(inputPath)) {
@@ -106,8 +107,8 @@ export class CLIUtils {
     }
 
     /**
-     * @param outputPath
-     * @param data
+     * @param {string} outputPath
+     * @param {any} data
      */
     public static writeFile (outputPath: string, data: any): void {
         mkdirp.sync(path.dirname(outputPath));

+ 12 - 12
src/container/InversifyContainerFacade.ts

@@ -39,8 +39,8 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
     }
 
     /**
-     * @param serviceIdentifier
-     * @return {(context:interfaces.Context)=>(bindingName:T)=>U}
+     * @param {interfaces.ServiceIdentifier<U>} serviceIdentifier
+     * @returns {U}
      */
     public static getFactory <T extends number, U> (
         serviceIdentifier: interfaces.ServiceIdentifier<U>
@@ -53,8 +53,8 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
     }
 
     /**
-     * @param serviceIdentifier
-     * @return {(context:interfaces.Context)=>(bindingName:T)=>U}
+     * @param {interfaces.ServiceIdentifier<U>} serviceIdentifier
+     * @returns {U}
      */
     public static getCacheFactory <T extends number, U> (
         serviceIdentifier: interfaces.ServiceIdentifier<U>
@@ -77,9 +77,9 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
     }
 
     /**
-     * @param serviceIdentifier
-     * @param dependencies
-     * @return {(context: interfaces.Context) => (bindingName: T) => U}
+     * @param {interfaces.ServiceIdentifier<interfaces.Newable<U>>} serviceIdentifier
+     * @param {any[]} dependencies
+     * @returns {U}
      */
     public static getConstructorFactory <T extends number, U> (
         serviceIdentifier: interfaces.ServiceIdentifier<interfaces.Newable<U>>,
@@ -114,7 +114,7 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
     }
 
     /**
-     * @param serviceIdentifier
+     * @param {interfaces.ServiceIdentifier<T>} serviceIdentifier
      * @returns {T}
      */
     public get <T> (serviceIdentifier: interfaces.ServiceIdentifier<T>): T {
@@ -122,8 +122,8 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
     }
 
     /**
-     * @param serviceIdentifier
-     * @param named
+     * @param {interfaces.ServiceIdentifier<T>} serviceIdentifier
+     * @param {string | number | symbol} named
      * @returns {T}
      */
     public getNamed <T> (serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T {
@@ -131,8 +131,8 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
     }
 
     /**
-     * @param sourceCode
-     * @param options
+     * @param {string} sourceCode
+     * @param {TInputOptions} options
      */
     public load (sourceCode: string, options: TInputOptions): void {
         this.container

+ 2 - 2
src/custom-nodes/AbstractCustomNode.ts

@@ -25,7 +25,7 @@ export abstract class AbstractCustomNode implements ICustomNode {
     protected readonly options: IOptions;
 
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -34,7 +34,7 @@ export abstract class AbstractCustomNode implements ICustomNode {
     }
 
     /**
-     * @param args
+     * @param {any[]} args
      */
     public abstract initialize (...args: any[]): void;
 

+ 8 - 7
src/custom-nodes/AbstractCustomNodeGroup.ts

@@ -40,8 +40,8 @@ export abstract class AbstractCustomNodeGroup implements ICustomNodeGroup {
     protected readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -52,8 +52,8 @@ export abstract class AbstractCustomNodeGroup implements ICustomNodeGroup {
     }
 
     /**
-     * @param blockScopeNode
-     * @param stackTraceData
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {IStackTraceData[]} stackTraceData
      */
     public abstract appendCustomNodes (blockScopeNode: TNodeWithBlockStatement, stackTraceData: IStackTraceData[]): void;
 
@@ -74,8 +74,8 @@ export abstract class AbstractCustomNodeGroup implements ICustomNodeGroup {
     public abstract initialize (): void;
 
     /**
-     * @param customNodeName
-     * @param callback
+     * @param {CustomNode} customNodeName
+     * @param {callback} callback
      */
     protected appendCustomNodeIfExist (customNodeName: CustomNode, callback: (customNode: ICustomNode) => void): void {
         const customNode: ICustomNode | undefined = this.customNodes.get(customNodeName);
@@ -88,7 +88,8 @@ export abstract class AbstractCustomNodeGroup implements ICustomNodeGroup {
     }
 
     /**
-     * @param stackTraceLength
+     * @param {number} stackTraceLength
+     * @returns {number}
      */
     protected getRandomStackTraceIndex (stackTraceLength: number): number {
         return this.randomGenerator.getRandomInteger(0, Math.max(0, Math.round(stackTraceLength - 1)));

+ 3 - 3
src/custom-nodes/console-output-nodes/ConsoleOutputDisableExpressionNode.ts

@@ -29,8 +29,8 @@ export class ConsoleOutputDisableExpressionNode extends AbstractCustomNode {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -42,7 +42,7 @@ export class ConsoleOutputDisableExpressionNode extends AbstractCustomNode {
     }
 
     /**
-     * @param callsControllerFunctionName
+     * @param {string} callsControllerFunctionName
      */
     public initialize (callsControllerFunctionName: string): void {
         this.callsControllerFunctionName = callsControllerFunctionName;

+ 7 - 7
src/custom-nodes/console-output-nodes/group/ConsoleOutputCustomNodeGroup.ts

@@ -42,10 +42,10 @@ export class ConsoleOutputCustomNodeGroup extends AbstractCustomNodeGroup {
     private readonly obfuscationEventEmitter: IObfuscationEventEmitter;
 
     /**
-     * @param customNodeFactory
-     * @param obfuscationEventEmitter
-     * @param randomGenerator
-     * @param options
+     * @param {TCustomNodeFactory} customNodeFactory
+     * @param {IObfuscationEventEmitter} obfuscationEventEmitter
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
@@ -60,8 +60,8 @@ export class ConsoleOutputCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     /**
-     * @param blockScopeNode
-     * @param stackTraceData
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {IStackTraceData[]} stackTraceData
      */
     public appendCustomNodes (blockScopeNode: TNodeWithBlockStatement, stackTraceData: IStackTraceData[]): void {
         const randomStackTraceIndex: number = this.getRandomStackTraceIndex(stackTraceData.length);
@@ -91,7 +91,7 @@ export class ConsoleOutputCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     public initialize (): void {
-        this.customNodes = new Map <CustomNode, ICustomNode> ();
+        this.customNodes = new Map <CustomNode, ICustomNode>();
 
         if (!this.options.disableConsoleOutput) {
             return;

+ 3 - 3
src/custom-nodes/control-flow-flattening-nodes/BinaryExpressionFunctionNode.ts

@@ -28,8 +28,8 @@ export class BinaryExpressionFunctionNode extends AbstractCustomNode {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -41,7 +41,7 @@ export class BinaryExpressionFunctionNode extends AbstractCustomNode {
     }
 
     /**
-     * @param operator
+     * @param {BinaryOperator} operator
      */
     public initialize (operator: BinaryOperator): void {
         this.operator = operator;

+ 6 - 6
src/custom-nodes/control-flow-flattening-nodes/BlockStatementControlFlowFlatteningNode.ts

@@ -40,8 +40,8 @@ export class BlockStatementControlFlowFlatteningNode extends AbstractCustomNode
     private shuffledKeys: number[];
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -52,10 +52,10 @@ export class BlockStatementControlFlowFlatteningNode extends AbstractCustomNode
         this.randomGenerator = randomGenerator;
     }
 
-    /***
-     * @param blockStatementBody
-     * @param shuffledKeys
-     * @param originalKeysIndexesInShuffledArray
+    /**
+     * @param {Statement[]} blockStatementBody
+     * @param {number[]} shuffledKeys
+     * @param {number[]} originalKeysIndexesInShuffledArray
      */
     public initialize (
         blockStatementBody: ESTree.Statement[],

+ 3 - 3
src/custom-nodes/control-flow-flattening-nodes/CallExpressionFunctionNode.ts

@@ -28,8 +28,8 @@ export class CallExpressionFunctionNode extends AbstractCustomNode {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -41,7 +41,7 @@ export class CallExpressionFunctionNode extends AbstractCustomNode {
     }
 
     /**
-     * @param expressionArguments
+     * @param {(Expression | SpreadElement)[]} expressionArguments
      */
     public initialize (expressionArguments: (ESTree.Expression | ESTree.SpreadElement)[]): void {
         this.expressionArguments = expressionArguments;

+ 3 - 3
src/custom-nodes/control-flow-flattening-nodes/LogicalExpressionFunctionNode.ts

@@ -28,8 +28,8 @@ export class LogicalExpressionFunctionNode extends AbstractCustomNode {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -41,7 +41,7 @@ export class LogicalExpressionFunctionNode extends AbstractCustomNode {
     }
 
     /**
-     * @param operator
+     * @param {LogicalOperator} operator
      */
     public initialize (operator: LogicalOperator): void {
         this.operator = operator;

+ 3 - 3
src/custom-nodes/control-flow-flattening-nodes/StringLiteralNode.ts

@@ -25,8 +25,8 @@ export class StringLiteralNode extends AbstractCustomNode {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -38,7 +38,7 @@ export class StringLiteralNode extends AbstractCustomNode {
     }
 
     /**
-     * @param literalValue
+     * @param {string} literalValue
      */
     public initialize (literalValue: string): void {
         this.literalValue = literalValue;

+ 6 - 6
src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/CallExpressionControlFlowStorageCallNode.ts

@@ -47,8 +47,8 @@ export class CallExpressionControlFlowStorageCallNode extends AbstractCustomNode
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -60,10 +60,10 @@ export class CallExpressionControlFlowStorageCallNode extends AbstractCustomNode
     }
 
     /**
-     * @param controlFlowStorageName
-     * @param controlFlowStorageKey
-     * @param callee
-     * @param expressionArguments
+     * @param {string} controlFlowStorageName
+     * @param {string} controlFlowStorageKey
+     * @param {Expression} callee
+     * @param {(Expression | SpreadElement)[]} expressionArguments
      */
     public initialize (
         controlFlowStorageName: string,

+ 3 - 3
src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/ControlFlowStorageNode.ts

@@ -30,8 +30,8 @@ export class ControlFlowStorageNode extends AbstractCustomNode {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -43,7 +43,7 @@ export class ControlFlowStorageNode extends AbstractCustomNode {
     }
 
     /**
-     * @param controlFlowStorage
+     * @param {IStorage<ICustomNode>} controlFlowStorage
      */
     public initialize (controlFlowStorage: IStorage <ICustomNode>): void {
         this.controlFlowStorage = controlFlowStorage;

+ 6 - 6
src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/ExpressionWithOperatorControlFlowStorageCallNode.ts

@@ -46,8 +46,8 @@ export class ExpressionWithOperatorControlFlowStorageCallNode extends AbstractCu
     private rightValue: Expression;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -59,10 +59,10 @@ export class ExpressionWithOperatorControlFlowStorageCallNode extends AbstractCu
     }
 
     /**
-     * @param controlFlowStorageName
-     * @param controlFlowStorageKey
-     * @param leftValue
-     * @param rightValue
+     * @param {string} controlFlowStorageName
+     * @param {string} controlFlowStorageKey
+     * @param {Expression} leftValue
+     * @param {Expression} rightValue
      */
     public initialize (
         controlFlowStorageName: string,

+ 4 - 4
src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/StringLiteralControlFlowStorageCallNode.ts

@@ -32,8 +32,8 @@ export class StringLiteralControlFlowStorageCallNode extends AbstractCustomNode
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -45,8 +45,8 @@ export class StringLiteralControlFlowStorageCallNode extends AbstractCustomNode
     }
 
     /**
-     * @param controlFlowStorageName
-     * @param controlFlowStorageKey
+     * @param {string} controlFlowStorageName
+     * @param {string} controlFlowStorageKey
      */
     public initialize (
         controlFlowStorageName: string,

+ 2 - 2
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionCallNode.ts

@@ -23,7 +23,7 @@ export class DebugProtectionFunctionCallNode extends AbstractCustomNode {
     private debugProtectionFunctionName: string;
 
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -32,7 +32,7 @@ export class DebugProtectionFunctionCallNode extends AbstractCustomNode {
     }
 
     /**
-     * @param debugProtectionFunctionName
+     * @param {string} debugProtectionFunctionName
      */
     public initialize (debugProtectionFunctionName: string): void {
         this.debugProtectionFunctionName = debugProtectionFunctionName;

+ 2 - 2
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionIntervalNode.ts

@@ -23,7 +23,7 @@ export class DebugProtectionFunctionIntervalNode extends AbstractCustomNode {
     private debugProtectionFunctionName: string;
 
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -32,7 +32,7 @@ export class DebugProtectionFunctionIntervalNode extends AbstractCustomNode {
     }
 
     /**
-     * @param debugProtectionFunctionName
+     * @param {string} debugProtectionFunctionName
      */
     public initialize (debugProtectionFunctionName: string): void {
         this.debugProtectionFunctionName = debugProtectionFunctionName;

+ 2 - 2
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionNode.ts

@@ -23,7 +23,7 @@ export class DebugProtectionFunctionNode extends AbstractCustomNode {
     private debugProtectionFunctionName: string;
 
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -32,7 +32,7 @@ export class DebugProtectionFunctionNode extends AbstractCustomNode {
     }
 
     /**
-     * @param debugProtectionFunctionName
+     * @param {string} debugProtectionFunctionName
      */
     public initialize (debugProtectionFunctionName: string): void {
         this.debugProtectionFunctionName = debugProtectionFunctionName;

+ 7 - 7
src/custom-nodes/debug-protection-nodes/group/DebugProtectionCustomNodeGroup.ts

@@ -42,10 +42,10 @@ export class DebugProtectionCustomNodeGroup extends AbstractCustomNodeGroup {
     private readonly obfuscationEventEmitter: IObfuscationEventEmitter;
 
     /**
-     * @param customNodeFactory
-     * @param obfuscationEventEmitter
-     * @param randomGenerator
-     * @param options
+     * @param {TCustomNodeFactory} customNodeFactory
+     * @param {IObfuscationEventEmitter} obfuscationEventEmitter
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
@@ -60,8 +60,8 @@ export class DebugProtectionCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     /**
-     * @param blockScopeNode
-     * @param stackTraceData
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {IStackTraceData[]} stackTraceData
      */
     public appendCustomNodes (blockScopeNode: TNodeWithBlockStatement, stackTraceData: IStackTraceData[]): void {
         // debugProtectionFunctionNode append
@@ -84,7 +84,7 @@ export class DebugProtectionCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     public initialize (): void {
-        this.customNodes = new Map <CustomNode, ICustomNode> ();
+        this.customNodes = new Map <CustomNode, ICustomNode>();
 
         if (!this.options.debugProtection) {
             return;

+ 4 - 4
src/custom-nodes/domain-lock-nodes/DomainLockNode.ts

@@ -35,9 +35,9 @@ export class DomainLockNode extends AbstractCustomNode {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param cryptUtils
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {ICryptUtils} cryptUtils
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -51,7 +51,7 @@ export class DomainLockNode extends AbstractCustomNode {
     }
 
     /**
-     * @param callsControllerFunctionName
+     * @param {string} callsControllerFunctionName
      */
     public initialize (callsControllerFunctionName: string): void {
         this.callsControllerFunctionName = callsControllerFunctionName;

+ 7 - 7
src/custom-nodes/domain-lock-nodes/group/DomainLockCustomNodeGroup.ts

@@ -42,10 +42,10 @@ export class DomainLockCustomNodeGroup extends AbstractCustomNodeGroup {
     private readonly obfuscationEventEmitter: IObfuscationEventEmitter;
 
     /**
-     * @param customNodeFactory
-     * @param obfuscationEventEmitter
-     * @param randomGenerator
-     * @param options
+     * @param {TCustomNodeFactory} customNodeFactory
+     * @param {IObfuscationEventEmitter} obfuscationEventEmitter
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
@@ -60,8 +60,8 @@ export class DomainLockCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     /**
-     * @param blockScopeNode
-     * @param stackTraceData
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {IStackTraceData[]} stackTraceData
      */
     public appendCustomNodes (blockScopeNode: TNodeWithBlockStatement, stackTraceData: IStackTraceData[]): void {
         const randomStackTraceIndex: number = this.getRandomStackTraceIndex(stackTraceData.length);
@@ -91,7 +91,7 @@ export class DomainLockCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     public initialize (): void {
-        this.customNodes = new Map <CustomNode, ICustomNode> ();
+        this.customNodes = new Map <CustomNode, ICustomNode>();
 
         if (!this.options.domainLock.length) {
             return;

+ 3 - 3
src/custom-nodes/node-calls-controller-nodes/NodeCallsControllerFunctionNode.ts

@@ -34,7 +34,7 @@ export class NodeCallsControllerFunctionNode extends AbstractCustomNode {
     private appendEvent: ObfuscationEvent;
 
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -43,8 +43,8 @@ export class NodeCallsControllerFunctionNode extends AbstractCustomNode {
     }
 
     /**
-     * @param appendEvent
-     * @param callsControllerFunctionName
+     * @param {ObfuscationEvent} appendEvent
+     * @param {string} callsControllerFunctionName
      */
     public initialize (appendEvent: ObfuscationEvent, callsControllerFunctionName: string): void {
         this.appendEvent = appendEvent;

+ 4 - 4
src/custom-nodes/self-defending-nodes/SelfDefendingUnicodeNode.ts

@@ -38,9 +38,9 @@ export class SelfDefendingUnicodeNode extends AbstractCustomNode {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param escapeSequenceEncoder
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -54,7 +54,7 @@ export class SelfDefendingUnicodeNode extends AbstractCustomNode {
     }
 
     /**
-     * @param callsControllerFunctionName
+     * @param {string} callsControllerFunctionName
      */
     public initialize (callsControllerFunctionName: string): void {
         this.callsControllerFunctionName = callsControllerFunctionName;

+ 7 - 7
src/custom-nodes/self-defending-nodes/group/SelfDefendingCustomNodeGroup.ts

@@ -42,10 +42,10 @@ export class SelfDefendingCustomNodeGroup extends AbstractCustomNodeGroup {
     private readonly obfuscationEventEmitter: IObfuscationEventEmitter;
 
     /**
-     * @param customNodeFactory
-     * @param obfuscationEventEmitter
-     * @param randomGenerator
-     * @param options
+     * @param {TCustomNodeFactory} customNodeFactory
+     * @param {IObfuscationEventEmitter} obfuscationEventEmitter
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
@@ -60,8 +60,8 @@ export class SelfDefendingCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     /**
-     * @param blockScopeNode
-     * @param stackTraceData
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {IStackTraceData[]} stackTraceData
      */
     public appendCustomNodes (blockScopeNode: TNodeWithBlockStatement, stackTraceData: IStackTraceData[]): void {
         const randomStackTraceIndex: number = this.getRandomStackTraceIndex(stackTraceData.length);
@@ -91,7 +91,7 @@ export class SelfDefendingCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     public initialize (): void {
-        this.customNodes = new Map <CustomNode, ICustomNode> ();
+        this.customNodes = new Map <CustomNode, ICustomNode>();
 
         if (!this.options.selfDefending) {
             return;

+ 5 - 5
src/custom-nodes/string-array-nodes/StringArrayCallsWrapper.ts

@@ -52,8 +52,8 @@ export class StringArrayCallsWrapper extends AbstractCustomNode {
     private stringArrayCallsWrapperName: string;
 
     /**
-     * @param escapeSequenceEncoder
-     * @param options
+     * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IEscapeSequenceEncoder) escapeSequenceEncoder: IEscapeSequenceEncoder,
@@ -65,9 +65,9 @@ export class StringArrayCallsWrapper extends AbstractCustomNode {
     }
 
     /**
-     * @param stringArrayStorage
-     * @param stringArrayName
-     * @param stringArrayCallsWrapperName
+     * @param {IStorage<string>} stringArrayStorage
+     * @param {string} stringArrayName
+     * @param {string} stringArrayCallsWrapperName
      */
     public initialize (
         stringArrayStorage: IStorage <string>,

+ 4 - 4
src/custom-nodes/string-array-nodes/StringArrayNode.ts

@@ -37,7 +37,7 @@ export class StringArrayNode extends AbstractCustomNode {
     private stringArrayRotateValue: number;
 
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -46,9 +46,9 @@ export class StringArrayNode extends AbstractCustomNode {
     }
 
     /**
-     * @param stringArrayStorage
-     * @param stringArrayName
-     * @param stringArrayRotateValue
+     * @param {IStorage<string>} stringArrayStorage
+     * @param {string} stringArrayName
+     * @param {number} stringArrayRotateValue
      */
     public initialize (
         stringArrayStorage: IStorage <string>,

+ 6 - 6
src/custom-nodes/string-array-nodes/StringArrayRotateFunctionNode.ts

@@ -53,9 +53,9 @@ export class StringArrayRotateFunctionNode extends AbstractCustomNode {
     private stringArrayRotateValue: number;
 
     /**
-     * @param randomGenerator
-     * @param escapeSequenceEncoder
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -69,9 +69,9 @@ export class StringArrayRotateFunctionNode extends AbstractCustomNode {
     }
 
     /**
-     * @param stringArrayStorage
-     * @param stringArrayName
-     * @param stringArrayRotateValue
+     * @param {IStorage<string>} stringArrayStorage
+     * @param {string} stringArrayName
+     * @param {number} stringArrayRotateValue
      */
     public initialize (
         stringArrayStorage: IStorage <string>,

+ 8 - 8
src/custom-nodes/string-array-nodes/group/StringArrayCustomNodeGroup.ts

@@ -50,11 +50,11 @@ export class StringArrayCustomNodeGroup extends AbstractCustomNodeGroup {
     private stringArrayStorage: IStorage <string>;
 
     /**
-     * @param customNodeFactory
-     * @param obfuscationEventEmitter
-     * @param randomGenerator
-     * @param stringArrayStorage
-     * @param options
+     * @param {TCustomNodeFactory} customNodeFactory
+     * @param {IObfuscationEventEmitter} obfuscationEventEmitter
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IStorage<string>} stringArrayStorage
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
@@ -71,8 +71,8 @@ export class StringArrayCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     /**
-     * @param blockScopeNode
-     * @param stackTraceData
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {IStackTraceData[]} stackTraceData
      */
     public appendCustomNodes (blockScopeNode: TNodeWithBlockStatement, stackTraceData: IStackTraceData[]): void {
         if (!this.stringArrayStorage.getLength()) {
@@ -96,7 +96,7 @@ export class StringArrayCustomNodeGroup extends AbstractCustomNodeGroup {
     }
 
     public initialize (): void {
-        this.customNodes = new Map <CustomNode, ICustomNode> ();
+        this.customNodes = new Map <CustomNode, ICustomNode>();
 
         if (!this.options.stringArray) {
             return;

+ 3 - 3
src/decorators/Initializable.ts

@@ -3,8 +3,8 @@
 import { IInitializable } from '../interfaces/IInitializable';
 
 /**
- * @param initializeMethodKey
- * @returns {(target:IInitializable, propertyKey:(string|symbol))=>PropertyDescriptor}
+ * @param {string} initializeMethodKey
+ * @returns {any}
  */
 export function initializable (
     initializeMethodKey: string = 'initialize'
@@ -19,7 +19,7 @@ export function initializable (
         const initializeMethod: Function = target[initializeMethodKey];
 
         if (!initializeMethod || typeof initializeMethod !== 'function') {
-           throw new Error(`\`${initializeMethodKey}\` method with initialization logic not found. \`@${decoratorName}\` decorator requires \`${initializeMethodKey}\` method`);
+            throw new Error(`\`${initializeMethodKey}\` method with initialization logic not found. \`@${decoratorName}\` decorator requires \`${initializeMethodKey}\` method`);
         }
 
         const metadataPropertyKey: string = `_${propertyKey}`;

+ 5 - 5
src/node-transformers/AbstractNodeTransformer.ts

@@ -26,8 +26,8 @@ export abstract class AbstractNodeTransformer implements INodeTransformer {
     protected readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -45,9 +45,9 @@ export abstract class AbstractNodeTransformer implements INodeTransformer {
     public abstract getVisitor (): IVisitor;
 
     /**
-     * @param node
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {Node} node
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public abstract transformNode (node: ESTree.Node, parentNode: ESTree.Node): ESTree.Node;
 }

+ 11 - 11
src/node-transformers/control-flow-transformers/BlockStatementControlFlowTransformer.ts

@@ -29,10 +29,10 @@ export class BlockStatementControlFlowTransformer extends AbstractNodeTransforme
     private readonly controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory;
 
     /**
-     * @param controlFlowCustomNodeFactory
-     * @param arrayUtils
-     * @param randomGenerator
-     * @param options
+     * @param {TControlFlowCustomNodeFactory} controlFlowCustomNodeFactory
+     * @param {IArrayUtils} arrayUtils
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
@@ -48,14 +48,14 @@ export class BlockStatementControlFlowTransformer extends AbstractNodeTransforme
     }
 
     /**
-     * @param blockStatementNode
-     * @return {boolean}
+     * @param {BlockStatement} blockStatementNode
+     * @returns {boolean}
      */
     private static blockStatementHasProhibitedStatements (blockStatementNode: ESTree.BlockStatement): boolean {
         return blockStatementNode.body.some((statement: ESTree.Statement) => {
             const isBreakOrContinueStatement: boolean = Node.isBreakStatementNode(statement) || Node.isContinueStatementNode(statement);
-            const isVariableDeclarationWithLetOrConstKind: boolean = Node.isVariableDeclarationNode(statement) &&
-                (statement.kind === 'const' ||  statement.kind === 'let');
+            const isVariableDeclarationWithLetOrConstKind: boolean = Node.isVariableDeclarationNode(statement)
+                && (statement.kind === 'const' || statement.kind === 'let');
 
             return Node.isFunctionDeclarationNode(statement) || isBreakOrContinueStatement || isVariableDeclarationWithLetOrConstKind;
         });
@@ -75,9 +75,9 @@ export class BlockStatementControlFlowTransformer extends AbstractNodeTransforme
     }
 
     /**
-     * @param blockStatementNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {BlockStatement} blockStatementNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (blockStatementNode: ESTree.BlockStatement, parentNode: ESTree.Node): ESTree.Node {
         if (

+ 15 - 15
src/node-transformers/control-flow-transformers/FunctionControlFlowTransformer.ts

@@ -77,11 +77,11 @@ export class FunctionControlFlowTransformer extends AbstractNodeTransformer {
     private readonly controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory;
 
     /**
-     * @param controlFlowStorageFactory
-     * @param controlFlowReplacerFactory
-     * @param controlFlowCustomNodeFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TControlFlowStorageFactory} controlFlowStorageFactory
+     * @param {TControlFlowReplacerFactory} controlFlowReplacerFactory
+     * @param {TControlFlowCustomNodeFactory} controlFlowCustomNodeFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__TControlFlowStorage)
@@ -118,9 +118,9 @@ export class FunctionControlFlowTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param functionNode
-     * @param parentNode
-     * @returns {ESTree.Function}
+     * @param {Function} functionNode
+     * @param {Node} parentNode
+     * @returns {Function}
      */
     public transformNode (functionNode: ESTree.Function, parentNode: ESTree.Node): ESTree.Function {
         this.visitedFunctionNodes.add(functionNode);
@@ -151,8 +151,8 @@ export class FunctionControlFlowTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param hostNode
-     * @return {IStorage<ICustomNode>}
+     * @param {TNodeWithBlockStatement} hostNode
+     * @returns {IStorage<ICustomNode>}
      */
     private getControlFlowStorage (hostNode: TNodeWithBlockStatement): IStorage<ICustomNode> {
         const controlFlowStorage: IStorage <ICustomNode> = this.controlFlowStorageFactory();
@@ -171,7 +171,7 @@ export class FunctionControlFlowTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param functionNodeBody
+     * @param {BlockStatement} functionNodeBody
      * @returns {TNodeWithBlockStatement}
      */
     private getHostNode (functionNodeBody: ESTree.BlockStatement): TNodeWithBlockStatement {
@@ -195,8 +195,8 @@ export class FunctionControlFlowTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param node
-     * @return {boolean}
+     * @param {Node} node
+     * @returns {boolean}
      */
     private isVisitedFunctionNode (node: ESTree.Node): boolean {
         return (
@@ -207,8 +207,8 @@ export class FunctionControlFlowTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param functionNodeBody
-     * @param controlFlowStorage
+     * @param {BlockStatement} functionNodeBody
+     * @param {IStorage<ICustomNode>} controlFlowStorage
      */
     private transformFunctionBody (functionNodeBody: ESTree.BlockStatement, controlFlowStorage: IStorage<ICustomNode>): void {
         estraverse.replace(functionNodeBody, {

+ 14 - 14
src/node-transformers/control-flow-transformers/control-flow-replacers/AbstractControlFlowReplacer.ts

@@ -34,9 +34,9 @@ export abstract class AbstractControlFlowReplacer implements IControlFlowReplace
     protected readonly replacerDataByControlFlowStorageId: Map <string, Map<string, string[]>> = new Map();
 
     /**
-     * @param controlFlowCustomNodeFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TControlFlowCustomNodeFactory} controlFlowCustomNodeFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
@@ -50,8 +50,8 @@ export abstract class AbstractControlFlowReplacer implements IControlFlowReplace
     }
 
     /**
-     * @param identifierDataByControlFlowStorageId
-     * @param controlFlowStorageId
+     * @param {Map<string, Map<string, string[]>>} identifierDataByControlFlowStorageId
+     * @param {string} controlFlowStorageId
      * @returns {Map<string, string[]>}
      */
     protected static getStorageKeysByIdForCurrentStorage (
@@ -63,25 +63,25 @@ export abstract class AbstractControlFlowReplacer implements IControlFlowReplace
         if (identifierDataByControlFlowStorageId.has(controlFlowStorageId)) {
             storageKeysById = <Map<string, string[]>>identifierDataByControlFlowStorageId.get(controlFlowStorageId);
         } else {
-            storageKeysById = new Map <string, string[]> ();
+            storageKeysById = new Map <string, string[]>();
         }
 
         return storageKeysById;
     }
 
     /**
-     * @param node
-     * @param parentNode
-     * @param controlFlowStorage
-     * @returns {ESTree.Node}
+     * @param {Node} node
+     * @param {Node} parentNode
+     * @param {IStorage<ICustomNode>} controlFlowStorage
+     * @returns {Node}
      */
     public abstract replace (node: ESTree.Node, parentNode: ESTree.Node, controlFlowStorage: IStorage <ICustomNode>): ESTree.Node;
 
     /**
-     * @param customNode
-     * @param controlFlowStorage
-     * @param replacerId
-     * @param usingExistingIdentifierChance
+     * @param {ICustomNode} customNode
+     * @param {IStorage<ICustomNode>} controlFlowStorage
+     * @param {string} replacerId
+     * @param {number} usingExistingIdentifierChance
      * @returns {string}
      */
     protected insertCustomNodeToControlFlowStorage (

+ 7 - 7
src/node-transformers/control-flow-transformers/control-flow-replacers/BinaryExpressionControlFlowReplacer.ts

@@ -22,9 +22,9 @@ export class BinaryExpressionControlFlowReplacer extends ExpressionWithOperatorC
     private static readonly usingExistingIdentifierChance: number = 0.5;
 
     /**
-     * @param controlFlowCustomNodeFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TControlFlowCustomNodeFactory} controlFlowCustomNodeFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
@@ -36,10 +36,10 @@ export class BinaryExpressionControlFlowReplacer extends ExpressionWithOperatorC
     }
 
     /**
-     * @param binaryExpressionNode
-     * @param parentNode
-     * @param controlFlowStorage
-     * @returns {ESTree.Node}
+     * @param {BinaryExpression} binaryExpressionNode
+     * @param {Node} parentNode
+     * @param {IStorage<ICustomNode>} controlFlowStorage
+     * @returns {Node}
      */
     public replace (
         binaryExpressionNode: ESTree.BinaryExpression,

+ 12 - 13
src/node-transformers/control-flow-transformers/control-flow-replacers/CallExpressionControlFlowReplacer.ts

@@ -24,9 +24,9 @@ export class CallExpressionControlFlowReplacer extends AbstractControlFlowReplac
     private static readonly usingExistingIdentifierChance: number = 0.5;
 
     /**
-     * @param controlFlowCustomNodeFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TControlFlowCustomNodeFactory} controlFlowCustomNodeFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
@@ -38,10 +38,10 @@ export class CallExpressionControlFlowReplacer extends AbstractControlFlowReplac
     }
 
     /**
-     * @param callExpressionNode
-     * @param parentNode
-     * @param controlFlowStorage
-     * @returns {ESTree.Node}
+     * @param {CallExpression} callExpressionNode
+     * @param {Node} parentNode
+     * @param {IStorage<ICustomNode>} controlFlowStorage
+     * @returns {Node}
      */
     public replace (
         callExpressionNode: ESTree.CallExpression,
@@ -78,12 +78,11 @@ export class CallExpressionControlFlowReplacer extends AbstractControlFlowReplac
     }
 
     /**
-     * @param controlFlowStorageId
-     * @param storageKey
-     * @param callee
-     * @param expressionArguments
-     * @param arguments
-     * @returns {ESTree.Node}
+     * @param {string} controlFlowStorageId
+     * @param {string} storageKey
+     * @param {Expression} callee
+     * @param {(Expression | SpreadElement)[]} expressionArguments
+     * @returns {Node}
      */
     protected getControlFlowStorageCallNode (
         controlFlowStorageId: string,

+ 8 - 8
src/node-transformers/control-flow-transformers/control-flow-replacers/ExpressionWithOperatorControlFlowReplacer.ts

@@ -28,9 +28,9 @@ export abstract class ExpressionWithOperatorControlFlowReplacer extends Abstract
     protected readonly replacerDataByControlFlowStorageId: Map <string, Map<string, string[]>> = new Map();
 
     /**
-     * @param controlFlowCustomNodeFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TControlFlowCustomNodeFactory} controlFlowCustomNodeFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
@@ -42,11 +42,11 @@ export abstract class ExpressionWithOperatorControlFlowReplacer extends Abstract
     }
 
     /**
-     * @param controlFlowStorageId
-     * @param storageKey
-     * @param leftExpression
-     * @param rightExpression
-     * @returns {ESTree.Node}
+     * @param {string} controlFlowStorageId
+     * @param {string} storageKey
+     * @param {Expression} leftExpression
+     * @param {Expression} rightExpression
+     * @returns {Node}
      */
     protected getControlFlowStorageCallNode (
         controlFlowStorageId: string,

+ 9 - 9
src/node-transformers/control-flow-transformers/control-flow-replacers/LogicalExpressionControlFlowReplacer.ts

@@ -24,9 +24,9 @@ export class LogicalExpressionControlFlowReplacer extends ExpressionWithOperator
     private static readonly usingExistingIdentifierChance: number = 0.5;
 
     /**
-     * @param controlFlowCustomNodeFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TControlFlowCustomNodeFactory} controlFlowCustomNodeFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
@@ -38,10 +38,10 @@ export class LogicalExpressionControlFlowReplacer extends ExpressionWithOperator
     }
 
     /**
-     * @param logicalExpressionNode
-     * @param parentNode
-     * @param controlFlowStorage
-     * @returns {ESTree.Node}
+     * @param {LogicalExpression} logicalExpressionNode
+     * @param {Node} parentNode
+     * @param {IStorage<ICustomNode>} controlFlowStorage
+     * @returns {Node}
      */
     public replace (
         logicalExpressionNode: ESTree.LogicalExpression,
@@ -75,8 +75,8 @@ export class LogicalExpressionControlFlowReplacer extends ExpressionWithOperator
     }
 
     /**
-     * @param leftExpression
-     * @param rightExpression
+     * @param {Expression} leftExpression
+     * @param {Expression} rightExpression
      * @returns {boolean}
      */
     private checkForProhibitedExpressions (leftExpression: ESTree.Expression, rightExpression: ESTree.Expression): boolean {

+ 10 - 10
src/node-transformers/control-flow-transformers/control-flow-replacers/StringLiteralControlFlowReplacer.ts

@@ -24,9 +24,9 @@ export class StringLiteralControlFlowReplacer extends AbstractControlFlowReplace
     private static readonly usingExistingIdentifierChance: number = 1;
 
     /**
-     * @param controlFlowCustomNodeFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TControlFlowCustomNodeFactory} controlFlowCustomNodeFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
@@ -38,10 +38,10 @@ export class StringLiteralControlFlowReplacer extends AbstractControlFlowReplace
     }
 
     /**
-     * @param literalNode
-     * @param parentNode
-     * @param controlFlowStorage
-     * @returns {ESTree.Node}
+     * @param {Literal} literalNode
+     * @param {Node} parentNode
+     * @param {IStorage<ICustomNode>} controlFlowStorage
+     * @returns {Node}
      */
     public replace (
         literalNode: ESTree.Literal,
@@ -74,9 +74,9 @@ export class StringLiteralControlFlowReplacer extends AbstractControlFlowReplace
     }
 
     /**
-     * @param controlFlowStorageId
-     * @param storageKey
-     * @returns {ESTree.Node}
+     * @param {string} controlFlowStorageId
+     * @param {string} storageKey
+     * @returns {Node}
      */
     protected getControlFlowStorageCallNode (
         controlFlowStorageId: string,

+ 5 - 5
src/node-transformers/converting-transformers/MemberExpressionTransformer.ts

@@ -15,8 +15,8 @@ import { Node } from '../../node/Node';
 @injectable()
 export class MemberExpressionTransformer extends AbstractNodeTransformer {
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -50,9 +50,9 @@ export class MemberExpressionTransformer extends AbstractNodeTransformer {
      *
      * Literal node will be obfuscated by LiteralTransformer
      *
-     * @param memberExpressionNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {MemberExpression} memberExpressionNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (memberExpressionNode: ESTree.MemberExpression, parentNode: ESTree.Node): ESTree.Node {
         if (Node.isIdentifierNode(memberExpressionNode.property)) {

+ 5 - 5
src/node-transformers/converting-transformers/MethodDefinitionTransformer.ts

@@ -29,8 +29,8 @@ export class MethodDefinitionTransformer extends AbstractNodeTransformer {
     private static readonly ignoredNames: string[] = ['constructor'];
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -63,9 +63,9 @@ export class MethodDefinitionTransformer extends AbstractNodeTransformer {
      *     object[identifier] = 1;
      * Literal node will be obfuscated by LiteralTransformer
      *
-     * @param methodDefinitionNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {MethodDefinition} methodDefinitionNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (methodDefinitionNode: ESTree.MethodDefinition, parentNode: ESTree.Node): ESTree.Node {
         if (

+ 7 - 7
src/node-transformers/converting-transformers/TemplateLiteralTransformer.ts

@@ -18,8 +18,8 @@ import { Nodes } from '../../node/Nodes';
 @injectable()
 export class TemplateLiteralTransformer extends AbstractNodeTransformer {
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -29,8 +29,8 @@ export class TemplateLiteralTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param node
-     * @return {boolean}
+     * @param {Node} node
+     * @returns {boolean}
      */
     private static isLiteralNodeWithStringValue (node: ESTree.Node): boolean {
         return node && Node.isLiteralNode(node) && typeof node.value === 'string';
@@ -50,9 +50,9 @@ export class TemplateLiteralTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param templateLiteralNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {TemplateLiteral} templateLiteralNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (templateLiteralNode: ESTree.TemplateLiteral, parentNode: ESTree.Node): ESTree.Node {
         const templateLiteralExpressions: ESTree.Expression[] = templateLiteralNode.expressions;

+ 11 - 11
src/node-transformers/dead-code-injection-transformers/DeadCodeInjectionTransformer.ts

@@ -31,8 +31,8 @@ export class DeadCodeInjectionTransformer extends AbstractNodeTransformer {
     private readonly collectedBlockStatements: ESTree.BlockStatement[] = [];
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -55,9 +55,9 @@ export class DeadCodeInjectionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param programNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {Program} programNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (programNode: ESTree.Program, parentNode: ESTree.Node): ESTree.Node {
         this.transformProgramNode(programNode);
@@ -66,8 +66,8 @@ export class DeadCodeInjectionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param blockStatementNode
-     * @param collectedBlockStatements
+     * @param {BlockStatement} blockStatementNode
+     * @param {BlockStatement[]} collectedBlockStatements
      */
     private collectBlockStatementNodes (
         blockStatementNode: ESTree.BlockStatement,
@@ -121,9 +121,9 @@ export class DeadCodeInjectionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param blockStatementNode
-     * @param randomBlockStatementNode
-     * @return {ESTree.BlockStatement}
+     * @param {BlockStatement} blockStatementNode
+     * @param {BlockStatement} randomBlockStatementNode
+     * @returns {BlockStatement}
      */
     private replaceBlockStatementNode (
         blockStatementNode: ESTree.BlockStatement,
@@ -165,7 +165,7 @@ export class DeadCodeInjectionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param programNode
+     * @param {Program} programNode
      */
     private transformProgramNode (programNode: ESTree.Program): void {
         estraverse.traverse(programNode, {

+ 10 - 10
src/node-transformers/obfuscating-transformers/CatchClauseTransformer.ts

@@ -32,9 +32,9 @@ export class CatchClauseTransformer extends AbstractNodeTransformer {
     private readonly identifierObfuscatingReplacer: IIdentifierObfuscatingReplacer;
 
     /**
-     * @param identifierObfuscatingReplacerFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TIdentifierObfuscatingReplacerFactory} identifierObfuscatingReplacerFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)
@@ -63,9 +63,9 @@ export class CatchClauseTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param catchClauseNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {CatchClause} catchClauseNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (catchClauseNode: ESTree.CatchClause, parentNode: ESTree.Node): ESTree.Node {
         const nodeIdentifier: number = this.nodeIdentifier++;
@@ -77,8 +77,8 @@ export class CatchClauseTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param catchClauseNode
-     * @param nodeIdentifier
+     * @param {CatchClause} catchClauseNode
+     * @param {number} nodeIdentifier
      */
     private storeCatchClauseParam (catchClauseNode: ESTree.CatchClause, nodeIdentifier: number): void {
         if (Node.isIdentifierNode(catchClauseNode.param)) {
@@ -87,8 +87,8 @@ export class CatchClauseTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param catchClauseNode
-     * @param nodeIdentifier
+     * @param {CatchClause} catchClauseNode
+     * @param {number} nodeIdentifier
      */
     private replaceCatchClauseParam (catchClauseNode: ESTree.CatchClause, nodeIdentifier: number): void {
         estraverse.replace(catchClauseNode, {

+ 12 - 12
src/node-transformers/obfuscating-transformers/FunctionDeclarationTransformer.ts

@@ -41,9 +41,9 @@ export class FunctionDeclarationTransformer extends AbstractNodeTransformer {
     private readonly replaceableIdentifiers: Map <ESTree.Node, ESTree.Identifier[]> = new Map();
 
     /**
-     * @param identifierObfuscatingReplacerFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TIdentifierObfuscatingReplacerFactory} identifierObfuscatingReplacerFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)
@@ -72,9 +72,9 @@ export class FunctionDeclarationTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param functionDeclarationNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {FunctionDeclaration} functionDeclarationNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (functionDeclarationNode: ESTree.FunctionDeclaration, parentNode: ESTree.Node): ESTree.Node {
         const nodeIdentifier: number = this.nodeIdentifier++;
@@ -98,16 +98,16 @@ export class FunctionDeclarationTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param functionDeclarationNode
-     * @param nodeIdentifier
+     * @param {FunctionDeclaration} functionDeclarationNode
+     * @param {number} nodeIdentifier
      */
     private storeFunctionName (functionDeclarationNode: ESTree.FunctionDeclaration, nodeIdentifier: number): void {
         this.identifierObfuscatingReplacer.storeNames(functionDeclarationNode.id.name, nodeIdentifier);
     }
 
     /**
-     * @param scopeNode
-     * @param nodeIdentifier
+     * @param {Node} scopeNode
+     * @param {number} nodeIdentifier
      */
     private replaceScopeCachedIdentifiers (scopeNode: ESTree.Node, nodeIdentifier: number): void {
         const cachedReplaceableIdentifiers: ESTree.Identifier[] = <ESTree.Identifier[]>this.replaceableIdentifiers.get(scopeNode);
@@ -120,8 +120,8 @@ export class FunctionDeclarationTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param scopeNode
-     * @param nodeIdentifier
+     * @param {Node} scopeNode
+     * @param {number} nodeIdentifier
      */
     private replaceScopeIdentifiers (scopeNode: ESTree.Node, nodeIdentifier: number): void {
         const storedReplaceableIdentifiers: ESTree.Identifier[] = [];

+ 10 - 10
src/node-transformers/obfuscating-transformers/FunctionTransformer.ts

@@ -32,9 +32,9 @@ export class FunctionTransformer extends AbstractNodeTransformer {
     private readonly identifierObfuscatingReplacer: IIdentifierObfuscatingReplacer;
 
     /**
-     * @param identifierObfuscatingReplacerFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TIdentifierObfuscatingReplacerFactory} identifierObfuscatingReplacerFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)
@@ -67,9 +67,9 @@ export class FunctionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param functionNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {Function} functionNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (functionNode: ESTree.Function, parentNode: ESTree.Node): ESTree.Node {
         const nodeIdentifier: number = this.nodeIdentifier++;
@@ -81,8 +81,8 @@ export class FunctionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param functionNode
-     * @param nodeIdentifier
+     * @param {Function} functionNode
+     * @param {number} nodeIdentifier
      */
     private storeFunctionParams (functionNode: ESTree.Function, nodeIdentifier: number): void {
         functionNode.params
@@ -108,8 +108,8 @@ export class FunctionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param functionNode
-     * @param nodeIdentifier
+     * @param {Function} functionNode
+     * @param {number} nodeIdentifier
      */
     private replaceFunctionParams (functionNode: ESTree.Function, nodeIdentifier: number): void {
         const replaceVisitor: estraverse.Visitor = {

+ 10 - 10
src/node-transformers/obfuscating-transformers/LabeledStatementTransformer.ts

@@ -40,9 +40,9 @@ export class LabeledStatementTransformer extends AbstractNodeTransformer {
     private readonly identifierObfuscatingReplacer: IIdentifierObfuscatingReplacer;
 
     /**
-     * @param identifierObfuscatingReplacerFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TIdentifierObfuscatingReplacerFactory} identifierObfuscatingReplacerFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)
@@ -71,9 +71,9 @@ export class LabeledStatementTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param labeledStatementNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {LabeledStatement} labeledStatementNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (labeledStatementNode: ESTree.LabeledStatement, parentNode: ESTree.Node): ESTree.Node {
         const nodeIdentifier: number = this.nodeIdentifier++;
@@ -85,16 +85,16 @@ export class LabeledStatementTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param labeledStatementNode
-     * @param nodeIdentifier
+     * @param {LabeledStatement} labeledStatementNode
+     * @param {number} nodeIdentifier
      */
     private storeLabeledStatementName (labeledStatementNode: ESTree.LabeledStatement, nodeIdentifier: number): void {
         this.identifierObfuscatingReplacer.storeNames(labeledStatementNode.label.name, nodeIdentifier);
     }
 
     /**
-     * @param labeledStatementNode
-     * @param nodeIdentifier
+     * @param {LabeledStatement} labeledStatementNode
+     * @param {number} nodeIdentifier
      */
     private replaceLabeledStatementName (labeledStatementNode: ESTree.LabeledStatement, nodeIdentifier: number): void {
         estraverse.replace(labeledStatementNode, {

+ 6 - 6
src/node-transformers/obfuscating-transformers/LiteralTransformer.ts

@@ -22,9 +22,9 @@ export class LiteralTransformer extends AbstractNodeTransformer {
     private readonly literalObfuscatingReplacerFactory: TLiteralObfuscatingReplacerFactory;
 
     /**
-     * @param literalObfuscatingReplacerFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TLiteralObfuscatingReplacerFactory} literalObfuscatingReplacerFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IObfuscatingReplacer)
@@ -51,9 +51,9 @@ export class LiteralTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param literalNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {Literal} literalNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (literalNode: ESTree.Literal, parentNode: ESTree.Node): ESTree.Node {
         if (Node.isPropertyNode(parentNode) && parentNode.key === literalNode) {

+ 7 - 7
src/node-transformers/obfuscating-transformers/ObjectExpressionTransformer.ts

@@ -22,8 +22,8 @@ import { Node } from '../../node/Node';
 @injectable()
 export class ObjectExpressionTransformer extends AbstractNodeTransformer {
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -33,8 +33,8 @@ export class ObjectExpressionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param node
-     * @returns {ESTree.Literal}
+     * @param {Identifier} node
+     * @returns {Literal}
      */
     private static transformIdentifierPropertyKey (node: ESTree.Identifier): ESTree.Literal {
         return {
@@ -58,9 +58,9 @@ export class ObjectExpressionTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param objectExpressionNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {ObjectExpression} objectExpressionNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (objectExpressionNode: ESTree.ObjectExpression, parentNode: ESTree.Node): ESTree.Node {
         objectExpressionNode.properties

+ 12 - 12
src/node-transformers/obfuscating-transformers/VariableDeclarationTransformer.ts

@@ -42,9 +42,9 @@ export class VariableDeclarationTransformer extends AbstractNodeTransformer {
     private readonly replaceableIdentifiers: Map <ESTree.Node, ESTree.Identifier[]> = new Map();
 
     /**
-     * @param identifierObfuscatingReplacerFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TIdentifierObfuscatingReplacerFactory} identifierObfuscatingReplacerFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)
@@ -73,9 +73,9 @@ export class VariableDeclarationTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param variableDeclarationNode
-     * @param parentNode
-     * @returns {ESTree.Node}
+     * @param {VariableDeclaration} variableDeclarationNode
+     * @param {Node} parentNode
+     * @returns {Node}
      */
     public transformNode (variableDeclarationNode: ESTree.VariableDeclaration, parentNode: ESTree.Node): ESTree.Node {
         const blockScopeOfVariableDeclarationNode: TNodeWithBlockStatement = NodeUtils
@@ -103,8 +103,8 @@ export class VariableDeclarationTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param variableDeclarationNode
-     * @param nodeIdentifier
+     * @param {VariableDeclaration} variableDeclarationNode
+     * @param {number} nodeIdentifier
      */
     private storeVariableNames (variableDeclarationNode: ESTree.VariableDeclaration, nodeIdentifier: number): void {
         variableDeclarationNode.declarations
@@ -120,8 +120,8 @@ export class VariableDeclarationTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param scopeNode
-     * @param nodeIdentifier
+     * @param {Node} scopeNode
+     * @param {number} nodeIdentifier
      */
     private replaceScopeCachedIdentifiers (scopeNode: ESTree.Node, nodeIdentifier: number): void {
         const cachedReplaceableIdentifiers: ESTree.Identifier[] = <ESTree.Identifier[]>this.replaceableIdentifiers.get(scopeNode);
@@ -134,8 +134,8 @@ export class VariableDeclarationTransformer extends AbstractNodeTransformer {
     }
 
     /**
-     * @param scopeNode
-     * @param nodeIdentifier
+     * @param {Node} scopeNode
+     * @param {number} nodeIdentifier
      */
     private replaceScopeIdentifiers (scopeNode: ESTree.Node, nodeIdentifier: number): void {
         const storedReplaceableIdentifiers: ESTree.Identifier[] = [];

+ 4 - 4
src/node-transformers/obfuscating-transformers/obfuscating-replacers/AbstractObfuscatingReplacer.ts

@@ -14,7 +14,7 @@ export abstract class AbstractObfuscatingReplacer implements IObfuscatingReplace
     protected readonly options: IOptions;
 
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -23,9 +23,9 @@ export abstract class AbstractObfuscatingReplacer implements IObfuscatingReplace
     }
 
     /**
-     * @param nodeValue
-     * @param nodeIdentifier
-     * @returns {ESTree.Node}
+     * @param {any} nodeValue
+     * @param {number} nodeIdentifier
+     * @returns {Node}
      */
     public abstract replace (nodeValue: any, nodeIdentifier?: number): ESTree.Node;
 }

+ 8 - 8
src/node-transformers/obfuscating-transformers/obfuscating-replacers/identifier-obfuscating-replacers/BaseIdentifierObfuscatingReplacer.ts

@@ -23,8 +23,8 @@ export class BaseIdentifierObfuscatingReplacer extends AbstractObfuscatingReplac
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
-     * @param options
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@@ -36,9 +36,9 @@ export class BaseIdentifierObfuscatingReplacer extends AbstractObfuscatingReplac
     }
 
     /**
-     * @param nodeValue
-     * @param nodeIdentifier
-     * @returns {ESTree.Identifier}
+     * @param {string} nodeValue
+     * @param {number} nodeIdentifier
+     * @returns {Identifier}
      */
     public replace (nodeValue: string, nodeIdentifier: number): ESTree.Identifier {
         const mapKey: string = `${nodeValue}-${String(nodeIdentifier)}`;
@@ -54,8 +54,8 @@ export class BaseIdentifierObfuscatingReplacer extends AbstractObfuscatingReplac
      * Store all `nodeIdentifier`'s as keys in given `namesMap` with random names as value.
      * Reserved names will be ignored.
      *
-     * @param nodeName
-     * @param nodeIdentifier
+     * @param {string} nodeName
+     * @param {number} nodeIdentifier
      */
     public storeNames (nodeName: string, nodeIdentifier: number): void {
         if (!this.isReservedName(nodeName)) {
@@ -64,7 +64,7 @@ export class BaseIdentifierObfuscatingReplacer extends AbstractObfuscatingReplac
     }
 
     /**
-     * @param name
+     * @param {string} name
      * @returns {boolean}
      */
     private isReservedName (name: string): boolean {

+ 3 - 3
src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/BooleanLiteralObfuscatingReplacer.ts

@@ -11,7 +11,7 @@ import { Nodes } from '../../../../node/Nodes';
 @injectable()
 export class BooleanLiteralObfuscatingReplacer extends AbstractObfuscatingReplacer {
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -40,8 +40,8 @@ export class BooleanLiteralObfuscatingReplacer extends AbstractObfuscatingReplac
     }
 
     /**
-     * @param nodeValue
-     * @returns {ESTree.Node}
+     * @param {boolean} nodeValue
+     * @returns {Node}
      */
     public replace (nodeValue: boolean): ESTree.Node {
         return nodeValue

+ 3 - 3
src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/NumberLiteralObfuscatingReplacer.ts

@@ -17,7 +17,7 @@ export class NumberLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     private readonly numberLiteralCache: Map <number, string> = new Map();
 
     /**
-     * @param options
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
@@ -26,8 +26,8 @@ export class NumberLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param nodeValue
-     * @returns {ESTree.Node}
+     * @param {number} nodeValue
+     * @returns {Node}
      */
     public replace (nodeValue: number): ESTree.Node {
         let rawValue: string;

+ 25 - 23
src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/StringLiteralObfuscatingReplacer.ts

@@ -76,12 +76,12 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     private readonly stringArrayStorage: IStorage<string>;
 
     /**
-     * @param customNodeGroupStorage
-     * @param stringArrayStorage
-     * @param escapeSequenceEncoder
-     * @param randomGenerator
-     * @param cryptUtils
-     * @param options
+     * @param {IStorage<ICustomNodeGroup>} customNodeGroupStorage
+     * @param {IStorage<string>} stringArrayStorage
+     * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
+     * @param {IRandomGenerator} randomGenerator
+     * @param {ICryptUtils} cryptUtils
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.TCustomNodeGroupStorage) customNodeGroupStorage: IStorage<ICustomNodeGroup>,
@@ -91,7 +91,9 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
         @inject(ServiceIdentifiers.ICryptUtils) cryptUtils: ICryptUtils,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {
-        super(options);
+        super(
+            options
+        );
 
         this.customNodeGroupStorage = customNodeGroupStorage;
         this.stringArrayStorage = stringArrayStorage;
@@ -109,8 +111,8 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param hexadecimalIndex
-     * @return {ESTree.Literal}
+     * @param {string} hexadecimalIndex
+     * @returns {Literal}
      */
     private static getHexadecimalLiteralNode (hexadecimalIndex: string): ESTree.Literal {
         const hexadecimalLiteralNode: ESTree.Literal = Nodes.getLiteralNode(hexadecimalIndex);
@@ -121,8 +123,8 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param literalValue
-     * @return {ESTree.Literal}
+     * @param {string} literalValue
+     * @returns {Literal}
      */
     private static getRc4KeyLiteralNode (literalValue: string): ESTree.Literal {
         const rc4KeyLiteralNode: ESTree.Literal = Nodes.getLiteralNode(literalValue);
@@ -133,8 +135,8 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param nodeValue
-     * @returns {ESTree.Node}
+     * @param {string} nodeValue
+     * @returns {Node}
      */
     public replace (nodeValue: string): ESTree.Node {
         const useStringArray: boolean = this.canUseStringArray(nodeValue);
@@ -155,8 +157,8 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param nodeValue
-     * @return {boolean}
+     * @param {string} nodeValue
+     * @returns {boolean}
      */
     private canUseStringArray (nodeValue: string): boolean {
         return (
@@ -167,9 +169,9 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param value
-     * @param stringArrayStorageLength
-     * @return {IStringArrayIndexData}
+     * @param {string} value
+     * @param {number} stringArrayStorageLength
+     * @returns {IStringArrayIndexData}
      */
     private getStringArrayHexadecimalIndex (value: string, stringArrayStorageLength: number): IStringArrayIndexData {
         if (this.stringLiteralHexadecimalIndexCache.has(value)) {
@@ -191,7 +193,7 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param value
+     * @param {string} value
      * @returns {IEncodedValue}
      */
     private getEncodedValue (value: string): IEncodedValue {
@@ -218,8 +220,8 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param value
-     * @return {ESTree.Literal}
+     * @param {string} value
+     * @returns {Node}
      */
     private replaceWithLiteralNode (value: string): ESTree.Node {
         return Nodes.getLiteralNode(
@@ -228,8 +230,8 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     }
 
     /**
-     * @param value
-     * @returns {ESTree.Node}
+     * @param {string} value
+     * @returns {Node}
      */
     private replaceWithStringArrayCallNode (value: string): ESTree.Node {
         const { encodedValue, key }: IEncodedValue = this.getEncodedValue(value);

+ 29 - 35
src/node/Node.ts

@@ -6,7 +6,7 @@ import { NodeType } from '../enums/NodeType';
 
 export class Node {
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isArrowFunctionExpressionNode (node: ESTree.Node): node is ESTree.ArrowFunctionExpression {
@@ -14,7 +14,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isAssignmentPatternNode (node: ESTree.Node): node is ESTree.AssignmentPattern {
@@ -22,7 +22,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isBlockStatementNode (node: ESTree.Node): node is ESTree.BlockStatement {
@@ -30,7 +30,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isBreakStatementNode (node: ESTree.Node): node is ESTree.BreakStatement {
@@ -38,7 +38,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isCallExpressionNode (node: ESTree.Node): node is ESTree.CallExpression {
@@ -46,7 +46,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isCatchClauseNode (node: ESTree.Node): node is ESTree.CatchClause {
@@ -54,7 +54,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isContinueStatementNode (node: ESTree.Node): node is ESTree.ContinueStatement {
@@ -62,7 +62,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isExpressionStatementNode (node: ESTree.Node): node is ESTree.ExpressionStatement {
@@ -70,7 +70,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isFunctionDeclarationNode (node: ESTree.Node): node is ESTree.FunctionDeclaration {
@@ -78,7 +78,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isFunctionExpressionNode (node: ESTree.Node): node is ESTree.FunctionExpression {
@@ -86,7 +86,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isIdentifierNode (node: ESTree.Node): node is ESTree.Identifier {
@@ -94,7 +94,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isIfStatementNode (node: ESTree.Node): node is ESTree.IfStatement {
@@ -102,8 +102,8 @@ export class Node {
     }
 
     /**
-     * @param node
-     * @param parentNode
+     * @param {Node} node
+     * @param {Node} parentNode
      * @returns {boolean}
      */
     public static isLabelIdentifierNode (node: ESTree.Node, parentNode: ESTree.Node): node is ESTree.Identifier {
@@ -115,7 +115,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isLabeledStatementNode (node: ESTree.Node): node is ESTree.LabeledStatement {
@@ -123,7 +123,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isLiteralNode (node: ESTree.Node): node is ESTree.Literal {
@@ -131,7 +131,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isMemberExpressionNode (node: ESTree.Node): node is ESTree.MemberExpression {
@@ -139,7 +139,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isMethodDefinitionNode (node: ESTree.Node): node is ESTree.MethodDefinition {
@@ -147,7 +147,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isObjectPatternNode (node: ESTree.Node): node is ESTree.ObjectPattern {
@@ -155,7 +155,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isObjectExpressionNode (node: ESTree.Node): node is ESTree.ObjectExpression {
@@ -163,8 +163,7 @@ export class Node {
     }
 
     /**
-     *
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isProgramNode (node: ESTree.Node): node is ESTree.Program {
@@ -172,8 +171,7 @@ export class Node {
     }
 
     /**
-     *
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isPropertyNode (node: ESTree.Node): node is ESTree.Property {
@@ -181,8 +179,8 @@ export class Node {
     }
 
     /**
-     * @param node
-     * @param parentNode
+     * @param {Node} node
+     * @param {Node} parentNode
      * @returns {boolean}
      */
     public static isReplaceableIdentifierNode (node: ESTree.Node, parentNode: ESTree.Node): node is ESTree.Identifier {
@@ -201,8 +199,7 @@ export class Node {
     }
 
     /**
-     *
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isTemplateLiteralNode (node: ESTree.Node): node is ESTree.TemplateLiteral {
@@ -210,8 +207,7 @@ export class Node {
     }
 
     /**
-     *
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isUnaryExpressionNode (node: ESTree.Node): node is ESTree.UnaryExpression {
@@ -219,8 +215,7 @@ export class Node {
     }
 
     /**
-     *
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isVariableDeclarationNode (node: ESTree.Node): node is ESTree.VariableDeclaration {
@@ -228,8 +223,7 @@ export class Node {
     }
 
     /**
-     *
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isVariableDeclaratorNode (node: ESTree.Node): node is ESTree.VariableDeclarator {
@@ -237,7 +231,7 @@ export class Node {
     }
 
     /**
-     * @param node
+     * @param {Node} node
      * @returns {boolean}
      */
     public static isNodeHasBlockStatement (node: ESTree.Node): node is TNodeWithBlockStatement {

+ 19 - 18
src/node/NodeAppender.ts

@@ -24,8 +24,8 @@ import { IStackTraceData } from '../interfaces/stack-trace-analyzer/IStackTraceD
  */
 export class NodeAppender {
     /**
-     * @param blockScopeNode
-     * @param nodeBodyStatements
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {TStatement[]} nodeBodyStatements
      */
     public static appendNode (
         blockScopeNode: TNodeWithBlockStatement,
@@ -44,10 +44,10 @@ export class NodeAppender {
     }
 
     /**
-     * @param blockScopeStackTraceData
-     * @param blockScopeNode
-     * @param nodeBodyStatements
-     * @param index
+     * @param {IStackTraceData[]} blockScopeStackTraceData
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {TStatement[]} nodeBodyStatements
+     * @param {number} index
      */
     public static appendNodeToOptimalBlockScope (
         blockScopeStackTraceData: IStackTraceData[],
@@ -72,10 +72,10 @@ export class NodeAppender {
     /**
      * Returns deepest block scope node at given deep.
      *
-     * @param blockScopeTraceData
-     * @param index
-     * @param deep
-     * @returns {ESTree.BlockStatement}
+     * @param {IStackTraceData[]} blockScopeTraceData
+     * @param {number} index
+     * @param {number} deep
+     * @returns {BlockStatement}
      */
     public static getOptimalBlockScope (
         blockScopeTraceData: IStackTraceData[],
@@ -96,9 +96,9 @@ export class NodeAppender {
     }
 
     /**
-     * @param blockScopeNode
-     * @param nodeBodyStatements
-     * @param index
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {TStatement[]} nodeBodyStatements
+     * @param {number} index
      */
     public static insertNodeAtIndex (
         blockScopeNode: TNodeWithBlockStatement,
@@ -119,8 +119,8 @@ export class NodeAppender {
     }
 
     /**
-     * @param blockScopeNode
-     * @param nodeBodyStatements
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {TStatement[]} nodeBodyStatements
      */
     public static prependNode (
         blockScopeNode: TNodeWithBlockStatement,
@@ -139,8 +139,9 @@ export class NodeAppender {
     }
 
     /**
-     * @param blockScopeNode
-     * @param nodeBodyStatements
+     * @param {TNodeWithBlockStatement} blockScopeNode
+     * @param {TStatement[]} nodeBodyStatements
+     * @returns {TStatement[]}
      */
     private static parentizeBodyStatementsBeforeAppend (
         blockScopeNode: TNodeWithBlockStatement,
@@ -154,7 +155,7 @@ export class NodeAppender {
     }
 
     /**
-     * @param nodeBodyStatements
+     * @param {TStatement[]} nodeBodyStatements
      * @returns {boolean}
      */
     private static validateBodyStatements (nodeBodyStatements: TStatement[]): boolean {

+ 25 - 25
src/node/NodeUtils.ts

@@ -24,8 +24,8 @@ export class NodeUtils {
     ];
 
     /**
-     * @param astTree
-     * @return {T}
+     * @param {T} astTree
+     * @returns {T}
      */
     public static addXVerbatimPropertyToLiterals <T extends ESTree.Node> (astTree: T): T {
         NodeUtils.typedReplace(astTree, NodeType.Literal, {
@@ -41,8 +41,8 @@ export class NodeUtils {
     }
 
     /**
-     * @param astTree
-     * @return {ESTree.Node}
+     * @param {T} astTree
+     * @returns {T}
      */
     public static clone <T extends ESTree.Node> (astTree: T): T {
         const cloneRecursive: (node: T) => T = (node: T) => {
@@ -76,7 +76,7 @@ export class NodeUtils {
     }
 
     /**
-     * @param code
+     * @param {string} code
      * @returns {TStatement[]}
      */
     public static convertCodeToStructure (code: string): TStatement[] {
@@ -89,7 +89,7 @@ export class NodeUtils {
     }
 
     /**
-     * @param structure
+     * @param {Node[]} structure
      * @returns {string}
      */
     public static convertStructureToCode (structure: ESTree.Node[]): string {
@@ -105,9 +105,9 @@ export class NodeUtils {
     }
 
     /**
-     * @param node
-     * @param index
-     * @returns {ESTree.Node}
+     * @param {Node} node
+     * @param {number} index
+     * @returns {Node}
      */
     public static getBlockStatementNodeByIndex (node: ESTree.Node, index: number = 0): ESTree.Node {
         if (Node.isNodeHasBlockStatement(node)) {
@@ -122,9 +122,9 @@ export class NodeUtils {
     }
 
     /**
-     * @param node
-     * @param blockScopes
-     * @returns {ESTree.Node}
+     * @param {Node} node
+     * @param {TNodeWithBlockStatement[]} blockScopes
+     * @returns {TNodeWithBlockStatement[]}
      */
     public static getBlockScopesOfNode (node: ESTree.Node, blockScopes: TNodeWithBlockStatement[] = []): TNodeWithBlockStatement[] {
         const parentNode: ESTree.Node | undefined = node.parentNode;
@@ -153,8 +153,8 @@ export class NodeUtils {
     }
 
     /**
-     * @param node
-     * @param depth
+     * @param {Node} node
+     * @param {number} depth
      * @returns {number}
      */
     public static getNodeBlockScopeDepth (node: ESTree.Node, depth: number = 0): number {
@@ -176,8 +176,8 @@ export class NodeUtils {
     }
 
     /**
-     * @param unaryExpressionNode
-     * @returns {ESTree.Node}
+     * @param {UnaryExpression} unaryExpressionNode
+     * @returns {Node}
      */
     public static getUnaryExpressionArgumentNode (unaryExpressionNode: ESTree.UnaryExpression): ESTree.Node {
         if (Node.isUnaryExpressionNode(unaryExpressionNode.argument)) {
@@ -188,8 +188,8 @@ export class NodeUtils {
     }
 
     /**
-     * @param astTree
-     * @return {T}
+     * @param {T} astTree
+     * @returns {T}
      */
     public static parentize <T extends ESTree.Node> (astTree: T): T {
         let isRootNode: boolean = true;
@@ -220,9 +220,9 @@ export class NodeUtils {
     }
 
     /**
-     * @param astTree
-     * @param nodeType
-     * @param visitor
+     * @param {Node} astTree
+     * @param {string} nodeType
+     * @param {visitor} visitor
      */
     public static typedReplace (
         astTree: ESTree.Node,
@@ -233,10 +233,10 @@ export class NodeUtils {
     }
 
     /**
-     * @param astTree
-     * @param nodeType
-     * @param visitor
-     * @param traverseType
+     * @param {Node} astTree
+     * @param {string} nodeType
+     * @param {Visitor} visitor
+     * @param {string} traverseType
      */
     public static typedTraverse (
         astTree: ESTree.Node,

+ 83 - 80
src/node/Nodes.ts

@@ -7,8 +7,8 @@ import { NodeType } from '../enums/NodeType';
 
 export class Nodes {
     /**
-     * @param body
-     * @returns {ESTree.Program}
+     * @param {TStatement[]} body
+     * @returns {Program}
      */
     public static getProgramNode (body: TStatement[] = []): ESTree.Program {
         return {
@@ -20,8 +20,8 @@ export class Nodes {
     }
 
     /**
-     * @param elements
-     * @return {ESTree.ArrayExpression}
+     * @param {(Expression | SpreadElement)[]} elements
+     * @returns {ArrayExpression}
      */
     public static getArrayExpressionNode (
         elements: (ESTree.Expression | ESTree.SpreadElement)[] = []
@@ -33,10 +33,10 @@ export class Nodes {
     }
 
     /**
-     * @param operator
-     * @param left
-     * @param right
-     * @return {ESTree.AssignmentExpression}
+     * @param {AssignmentOperator} operator
+     * @param {Pattern | MemberExpression} left
+     * @param {Expression} right
+     * @returns {AssignmentExpression}
      */
     public static getAssignmentExpressionNode (
         operator: ESTree.AssignmentOperator,
@@ -53,10 +53,10 @@ export class Nodes {
     }
 
     /**
-     * @param operator
-     * @param left
-     * @param right
-     * @returns {ESTree.BinaryExpression}
+     * @param {BinaryOperator} operator
+     * @param {Expression} left
+     * @param {Expression} right
+     * @returns {BinaryExpression}
      */
     public static getBinaryExpressionNode (
         operator: ESTree.BinaryOperator,
@@ -73,8 +73,8 @@ export class Nodes {
     }
 
     /**
-     * @param body
-     * @returns {ESTree.BlockStatement}
+     * @param {Statement[]} body
+     * @returns {BlockStatement}
      */
     public static getBlockStatementNode (body: ESTree.Statement[] = []): ESTree.BlockStatement {
         return {
@@ -85,8 +85,8 @@ export class Nodes {
     }
 
     /**
-     * @param label
-     * @return {ESTree.BreakStatement}
+     * @param {Identifier} label
+     * @returns {BreakStatement}
      */
     public static getBreakStatement (label?: ESTree.Identifier): ESTree.BreakStatement {
         const breakStatementNode: ESTree.BreakStatement = {
@@ -102,8 +102,8 @@ export class Nodes {
     }
 
     /**
-     * @param body
-     * @returns {ESTree.CatchClause}
+     * @param {Statement[]} body
+     * @returns {CatchClause}
      */
     public static getCatchClauseNode (body: ESTree.Statement[] = []): ESTree.CatchClause {
         return {
@@ -115,9 +115,9 @@ export class Nodes {
     }
 
     /**
-     * @param callee
-     * @param args
-     * @returns {ESTree.CallExpression}
+     * @param {Expression} callee
+     * @param {(Expression | SpreadElement)[]} args
+     * @returns {CallExpression}
      */
     public static getCallExpressionNode (
         callee: ESTree.Expression,
@@ -132,8 +132,8 @@ export class Nodes {
     }
 
     /**
-     * @param label
-     * @return {ESTree.ContinueStatement}
+     * @param {Identifier} label
+     * @returns {ContinueStatement}
      */
     public static getContinueStatement (label?: ESTree.Identifier): ESTree.ContinueStatement {
         const continueStatementNode: ESTree.ContinueStatement = {
@@ -149,8 +149,8 @@ export class Nodes {
     }
 
     /**
-     * @param expression
-     * @returns {ESTree.ExpressionStatement}
+     * @param {Expression} expression
+     * @returns {ExpressionStatement}
      */
     public static getExpressionStatementNode (expression: ESTree.Expression): ESTree.ExpressionStatement {
         return {
@@ -161,10 +161,10 @@ export class Nodes {
     }
 
     /**
-     * @param functionName
-     * @param params
-     * @param body
-     * @returns {ESTree.FunctionDeclaration}
+     * @param {string} functionName
+     * @param {Identifier[]} params
+     * @param {BlockStatement} body
+     * @returns {FunctionDeclaration}
      */
     public static getFunctionDeclarationNode (
         functionName: string,
@@ -182,9 +182,9 @@ export class Nodes {
     }
 
     /**
-     * @param params
-     * @param body
-     * @returns {ESTree.FunctionExpression}
+     * @param {Identifier[]} params
+     * @param {BlockStatement} body
+     * @returns {FunctionExpression}
      */
     public static getFunctionExpressionNode (
         params: ESTree.Identifier[],
@@ -200,10 +200,10 @@ export class Nodes {
     }
 
     /**
-     * @param test
-     * @param consequent
-     * @param alternate
-     * @returns {ESTree.IfStatement}
+     * @param {Expression} test
+     * @param {BlockStatement} consequent
+     * @param {BlockStatement} alternate
+     * @returns {IfStatement}
      */
     public static getIfStatementNode (
         test: ESTree.Expression,
@@ -214,14 +214,14 @@ export class Nodes {
             type: NodeType.IfStatement,
             test,
             consequent,
-            ...alternate && {alternate},
+            ...alternate && { alternate },
             obfuscatedNode: false
         };
     }
 
     /**
-     * @param name
-     * @returns {ESTree.Identifier}
+     * @param {string} name
+     * @returns {Identifier}
      */
     public static getIdentifierNode (name: string): ESTree.Identifier {
         return {
@@ -232,9 +232,9 @@ export class Nodes {
     }
 
     /**
-     * @param label
-     * @param body
-     * @returns {ESTree.LabeledStatement}
+     * @param {Identifier} label
+     * @param {Statement} body
+     * @returns {LabeledStatement}
      */
     public static getLabeledStatement (label: ESTree.Identifier, body: ESTree.Statement): ESTree.LabeledStatement {
         return {
@@ -246,9 +246,9 @@ export class Nodes {
     }
 
     /**
-     * @param value
-     * @param raw
-     * @returns {ESTree.Literal}
+     * @param {boolean | number | string} value
+     * @param {string} raw
+     * @returns {Literal}
      */
     public static getLiteralNode (value: boolean|number|string, raw?: string): ESTree.Literal {
         raw = raw !== undefined ? raw : `'${value}'`;
@@ -266,10 +266,10 @@ export class Nodes {
     }
 
     /**
-     * @param operator
-     * @param left
-     * @param right
-     * @returns {ESTree.LogicalExpression}
+     * @param {LogicalOperator} operator
+     * @param {Expression} left
+     * @param {Expression} right
+     * @returns {LogicalExpression}
      */
     public static getLogicalExpressionNode (
         operator: ESTree.LogicalOperator,
@@ -286,10 +286,10 @@ export class Nodes {
     }
 
     /**
-     * @param object
-     * @param property
-     * @param computed
-     * @return {ESTree.MemberExpression}
+     * @param {Expression | Super} object
+     * @param {Expression} property
+     * @param {boolean} computed
+     * @returns {MemberExpression}
      */
     public static getMemberExpressionNode (
         object: ESTree.Expression | ESTree.Super,
@@ -306,8 +306,8 @@ export class Nodes {
     }
 
     /**
-     * @param properties
-     * @return {ESTree.ObjectExpression}
+     * @param {Property[]} properties
+     * @returns {ObjectExpression}
      */
     public static getObjectExpressionNode (properties: ESTree.Property[]): ESTree.ObjectExpression {
         return {
@@ -318,7 +318,10 @@ export class Nodes {
     }
 
     /**
-     * @return {ESTree.Property}
+     * @param {Expression} key
+     * @param {Expression | Pattern} value
+     * @param {boolean} computed
+     * @returns {Property}
      */
     public static getPropertyNode (
         key: ESTree.Expression,
@@ -338,10 +341,10 @@ export class Nodes {
     }
 
     /**
-     * @param operator
-     * @param argument
-     * @param prefix
-     * @returns {ESTree.Literal}
+     * @param {UnaryOperator} operator
+     * @param {Expression} argument
+     * @param {boolean} prefix
+     * @returns {UnaryExpression}
      */
     public static getUnaryExpressionNode (
         operator: ESTree.UnaryOperator,
@@ -358,8 +361,8 @@ export class Nodes {
     }
 
     /**
-     * @param argument
-     * @return {ReturnStatement}
+     * @param {Expression} argument
+     * @returns {ReturnStatement}
      */
     public static getReturnStatementNode (argument: ESTree.Expression): ESTree.ReturnStatement {
         return {
@@ -370,9 +373,9 @@ export class Nodes {
     }
 
     /**
-     * @param discriminant
-     * @param cases
-     * @returns {ESTree.SwitchStatement}
+     * @param {Expression} discriminant
+     * @param {SwitchCase[]} cases
+     * @returns {SwitchStatement}
      */
     public static getSwitchStatementNode (
         discriminant: ESTree.Expression,
@@ -387,9 +390,9 @@ export class Nodes {
     }
 
     /**
-     * @param test
-     * @param consequent
-     * @returns {ESTree.SwitchCase}
+     * @param {Expression} test
+     * @param {Statement[]} consequent
+     * @returns {SwitchCase}
      */
     public static getSwitchCaseNode (test: ESTree.Expression, consequent: ESTree.Statement[]): ESTree.SwitchCase {
         return {
@@ -401,9 +404,9 @@ export class Nodes {
     }
 
     /**
-     * @param operator
-     * @param argumentExpr
-     * @returns {ESTree.UpdateExpression}
+     * @param {UpdateOperator} operator
+     * @param {Expression} argumentExpr
+     * @returns {UpdateExpression}
      */
     public static getUpdateExpressionNode (operator: ESTree.UpdateOperator, argumentExpr: ESTree.Expression): ESTree.UpdateExpression {
         return {
@@ -416,9 +419,9 @@ export class Nodes {
     }
 
     /**
-     * @param declarations
-     * @param kind
-     * @returns {ESTree.VariableDeclaration}
+     * @param {VariableDeclarator[]} declarations
+     * @param {string} kind
+     * @returns {VariableDeclaration}
      */
     public static getVariableDeclarationNode (
         declarations: ESTree.VariableDeclarator[] = [],
@@ -433,9 +436,9 @@ export class Nodes {
     }
 
     /**
-     * @param id
-     * @param init
-     * @returns {ESTree.VariableDeclarator}
+     * @param {Identifier} id
+     * @param {any} init
+     * @returns {VariableDeclarator}
      */
     public static getVariableDeclaratorNode (id: ESTree.Identifier, init: any): ESTree.VariableDeclarator {
         return {
@@ -447,9 +450,9 @@ export class Nodes {
     }
 
     /**
-     * @param test
-     * @param body
-     * @return {ESTree.WhileStatement}
+     * @param {Expression} test
+     * @param {Statement} body
+     * @returns {WhileStatement}
      */
     public static getWhileStatementNode (test: ESTree.Expression, body: ESTree.Statement): ESTree.WhileStatement {
         return {

+ 14 - 14
src/options/Options.ts

@@ -1,19 +1,19 @@
 import { injectable } from 'inversify';
 
 import {
-ArrayUnique,
-IsBoolean,
-IsArray,
-IsIn,
-IsNumber,
-IsString,
-IsUrl,
-Min,
-Max,
-ValidateIf,
-validateSync,
-ValidationError,
-ValidatorOptions
+    ArrayUnique,
+    IsBoolean,
+    IsArray,
+    IsIn,
+    IsNumber,
+    IsString,
+    IsUrl,
+    Min,
+    Max,
+    ValidateIf,
+    validateSync,
+    ValidationError,
+    ValidatorOptions
 } from 'class-validator';
 
 import { TInputOptions } from '../types/options/TInputOptions';
@@ -189,7 +189,7 @@ export class Options implements IOptions {
     public readonly unicodeEscapeSequence: boolean;
 
     /**
-     * @param inputOptions
+     * @param {TInputOptions} inputOptions
      */
     constructor (inputOptions: TInputOptions) {
         Object.assign(this, DEFAULT_PRESET, inputOptions);

+ 1 - 1
src/options/OptionsNormalizer.ts

@@ -31,7 +31,7 @@ export class OptionsNormalizer {
     ];
 
     /**
-     * @param options
+     * @param {IOptions} options
      * @returns {IOptions}
      */
     public static normalizeOptions (options: IOptions): IOptions {

+ 2 - 2
src/options/ValidationErrorsFormatter.ts

@@ -2,7 +2,7 @@ import { ValidationError } from 'class-validator';
 
 export class ValidationErrorsFormatter {
     /**
-     * @param validationErrors
+     * @param {ValidationError[]} validationErrors
      * @returns {string}
      */
     public static format (validationErrors: ValidationError[]): string {
@@ -16,7 +16,7 @@ export class ValidationErrorsFormatter {
     }
 
     /**
-     * @param validationError
+     * @param {ValidationError} validationError
      * @returns {string}
      */
     private static formatError (validationError: ValidationError): string {

+ 4 - 0
src/options/normalizer-rules/ControlFlowFlatteningThresholdRule.ts

@@ -2,6 +2,10 @@ import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRu
 
 import { IOptions } from '../../interfaces/options/IOptions';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const ControlFlowFlatteningThresholdRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     if (options.controlFlowFlatteningThreshold === 0) {
         options = {

+ 4 - 0
src/options/normalizer-rules/DeadCodeInjectionRule.ts

@@ -4,6 +4,10 @@ import { IOptions } from '../../interfaces/options/IOptions';
 
 import { DEFAULT_PRESET } from '../presets/Default';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const DeadCodeInjectionRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     if (options.deadCodeInjection) {
         options = {

+ 4 - 0
src/options/normalizer-rules/DeadCodeInjectionThresholdRule.ts

@@ -2,6 +2,10 @@ import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRu
 
 import { IOptions } from '../../interfaces/options/IOptions';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const DeadCodeInjectionThresholdRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     if (options.deadCodeInjectionThreshold === 0) {
         options = {

+ 4 - 0
src/options/normalizer-rules/DomainLockRule.ts

@@ -4,6 +4,10 @@ import { IOptions } from '../../interfaces/options/IOptions';
 
 import { Utils } from '../../utils/Utils';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const DomainLockRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     if (options.domainLock.length) {
         const normalizedDomains: string[] = [];

+ 4 - 0
src/options/normalizer-rules/SelfDefendingRule.ts

@@ -2,6 +2,10 @@ import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRu
 
 import { IOptions } from '../../interfaces/options/IOptions';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const SelfDefendingRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     if (options.selfDefending) {
         options = {

+ 4 - 0
src/options/normalizer-rules/SourceMapBaseUrlRule.ts

@@ -2,6 +2,10 @@ import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRu
 
 import { IOptions } from '../../interfaces/options/IOptions';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const SourceMapBaseUrlRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     const { sourceMapBaseUrl }: { sourceMapBaseUrl: string } = options;
 

+ 4 - 0
src/options/normalizer-rules/SourceMapFileNameRule.ts

@@ -2,6 +2,10 @@ import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRu
 
 import { IOptions } from '../../interfaces/options/IOptions';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const SourceMapFileNameRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     let { sourceMapFileName }: { sourceMapFileName: string } = options;
 

+ 4 - 0
src/options/normalizer-rules/StringArrayEncodingRule.ts

@@ -2,6 +2,10 @@ import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRu
 
 import { IOptions } from '../../interfaces/options/IOptions';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const StringArrayEncodingRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     if (options.stringArrayEncoding === true) {
         options = {

+ 4 - 0
src/options/normalizer-rules/StringArrayRule.ts

@@ -2,6 +2,10 @@ import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRu
 
 import { IOptions } from '../../interfaces/options/IOptions';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const StringArrayRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     if (!options.stringArray) {
         options = {

+ 4 - 0
src/options/normalizer-rules/StringArrayThresholdRule.ts

@@ -2,6 +2,10 @@ import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRu
 
 import { IOptions } from '../../interfaces/options/IOptions';
 
+/**
+ * @param {IOptions} options
+ * @returns {IOptions}
+ */
 export const StringArrayThresholdRule: TOptionsNormalizerRule = (options: IOptions): IOptions => {
     if (options.stringArrayThreshold === 0) {
         options = {

+ 6 - 7
src/stack-trace-analyzer/StackTraceAnalyzer.ts

@@ -79,7 +79,7 @@ export class StackTraceAnalyzer implements IStackTraceAnalyzer {
     }
 
     /**
-     * @param blockScopeBodyLength
+     * @param {number} blockScopeBodyLength
      * @returns {number}
      */
     public static getLimitIndex (blockScopeBodyLength: number): number {
@@ -102,7 +102,7 @@ export class StackTraceAnalyzer implements IStackTraceAnalyzer {
     }
 
     /**
-     * @param blockScopeBody
+     * @param {Node[]} blockScopeBody
      * @returns {IStackTraceData[]}
      */
     public analyze (blockScopeBody: ESTree.Node[]): IStackTraceData[] {
@@ -110,7 +110,7 @@ export class StackTraceAnalyzer implements IStackTraceAnalyzer {
     }
 
     /**
-     * @param blockScopeBody
+     * @param {Node[]} blockScopeBody
      * @returns {IStackTraceData[]}
      */
     private analyzeRecursive (blockScopeBody: ESTree.Node[]): IStackTraceData[] {
@@ -144,10 +144,9 @@ export class StackTraceAnalyzer implements IStackTraceAnalyzer {
     }
 
     /**
-     * @param stackTraceData
-     * @param blockScopeBody
-     * @param callExpressionNode
-     * @returns {IStackTraceData[]}
+     * @param {IStackTraceData[]} stackTraceData
+     * @param {Node[]} blockScopeBody
+     * @param {CallExpression} callExpressionNode
      */
     private analyzeCallExpressionNode (
         stackTraceData: IStackTraceData[],

+ 3 - 3
src/stack-trace-analyzer/callee-data-extractors/AbstractCalleeDataExtractor.ts

@@ -8,9 +8,9 @@ import { ICalleeDataExtractor } from '../../interfaces/stack-trace-analyzer/ICal
 @injectable()
 export abstract class AbstractCalleeDataExtractor implements ICalleeDataExtractor {
     /**
-     * @param blockScopeBody
-     * @param callee
-     * @returns {ICalleeData|null}
+     * @param {Node[]} blockScopeBody
+     * @param {Node} callee
+     * @returns {ICalleeData}
      */
     public abstract extract (blockScopeBody: ESTree.Node[], callee: ESTree.Node): ICalleeData|null;
 }

+ 6 - 6
src/stack-trace-analyzer/callee-data-extractors/FunctionDeclarationCalleeDataExtractor.ts

@@ -12,9 +12,9 @@ import { NodeUtils } from '../../node/NodeUtils';
 @injectable()
 export class FunctionDeclarationCalleeDataExtractor extends AbstractCalleeDataExtractor {
     /**
-     * @param blockScopeBody
-     * @param callee
-     * @returns {ICalleeData|null}
+     * @param {Node[]} blockScopeBody
+     * @param {Identifier} callee
+     * @returns {ICalleeData}
      */
     public extract (blockScopeBody: ESTree.Node[], callee: ESTree.Identifier): ICalleeData|null {
         if (!Node.isIdentifierNode(callee)) {
@@ -37,9 +37,9 @@ export class FunctionDeclarationCalleeDataExtractor extends AbstractCalleeDataEx
     }
 
     /**
-     * @param targetNode
-     * @param name
-     * @returns {ESTree.BlockStatement|null}
+     * @param {Node} targetNode
+     * @param {string} name
+     * @returns {BlockStatement}
      */
     private getCalleeBlockStatement (targetNode: ESTree.Node, name: string): ESTree.BlockStatement|null {
         let calleeBlockStatement: ESTree.BlockStatement|null = null;

+ 6 - 6
src/stack-trace-analyzer/callee-data-extractors/FunctionExpressionCalleeDataExtractor.ts

@@ -12,9 +12,9 @@ import { NodeUtils } from '../../node/NodeUtils';
 @injectable()
 export class FunctionExpressionCalleeDataExtractor extends AbstractCalleeDataExtractor {
     /**
-     * @param blockScopeBody
-     * @param callee
-     * @returns {ICalleeData|null}
+     * @param {Node[]} blockScopeBody
+     * @param {Identifier} callee
+     * @returns {ICalleeData}
      */
     public extract (blockScopeBody: ESTree.Node[], callee: ESTree.Identifier): ICalleeData|null {
         let calleeBlockStatement: ESTree.BlockStatement|null = null;
@@ -41,9 +41,9 @@ export class FunctionExpressionCalleeDataExtractor extends AbstractCalleeDataExt
     }
 
     /**
-     * @param targetNode
-     * @param name
-     * @returns {ESTree.BlockStatement|null}
+     * @param {Node} targetNode
+     * @param {string} name
+     * @returns {BlockStatement}
      */
     private getCalleeBlockStatement (targetNode: ESTree.Node, name: string): ESTree.BlockStatement|null {
         let calleeBlockStatement: ESTree.BlockStatement|null = null;

+ 11 - 11
src/stack-trace-analyzer/callee-data-extractors/ObjectExpressionCalleeDataExtractor.ts

@@ -14,9 +14,9 @@ import { AbstractCalleeDataExtractor } from './AbstractCalleeDataExtractor';
 @injectable()
 export class ObjectExpressionCalleeDataExtractor extends AbstractCalleeDataExtractor {
     /**
-     * @param blockScopeBody
-     * @param callee
-     * @returns {ICalleeData|null}
+     * @param {Node[]} blockScopeBody
+     * @param {MemberExpression} callee
+     * @returns {ICalleeData}
      */
     public extract (blockScopeBody: ESTree.Node[], callee: ESTree.MemberExpression): ICalleeData|null {
         if (!Node.isMemberExpressionNode(callee)) {
@@ -50,8 +50,8 @@ export class ObjectExpressionCalleeDataExtractor extends AbstractCalleeDataExtra
      *
      * Example: object.foo.bar(); // ['object', 'foo', 'bar']
      *
-     * @param currentChain
-     * @param memberExpression
+     * @param {TObjectMembersCallsChain} currentChain
+     * @param {MemberExpression} memberExpression
      * @returns {TObjectMembersCallsChain}
      */
     private createObjectMembersCallsChain (
@@ -84,9 +84,9 @@ export class ObjectExpressionCalleeDataExtractor extends AbstractCalleeDataExtra
     }
 
     /**
-     * @param targetNode
-     * @param objectMembersCallsChain
-     * @returns {ESTree.BlockStatement|null}
+     * @param {Node} targetNode
+     * @param {TObjectMembersCallsChain} objectMembersCallsChain
+     * @returns {BlockStatement}
      */
     private getCalleeBlockStatement (
         targetNode: ESTree.Node,
@@ -120,9 +120,9 @@ export class ObjectExpressionCalleeDataExtractor extends AbstractCalleeDataExtra
     }
 
     /**
-     * @param objectExpressionProperties
-     * @param objectMembersCallsChain
-     * @returns {ESTree.BlockStatement|null}
+     * @param {Property[]} objectExpressionProperties
+     * @param {TObjectMembersCallsChain} objectMembersCallsChain
+     * @returns {BlockStatement}
      */
     private findCalleeBlockStatement (
         objectExpressionProperties: ESTree.Property[],

+ 9 - 9
src/storages/ArrayStorage.ts

@@ -31,7 +31,7 @@ export abstract class ArrayStorage <T> implements IStorage <T> {
     private storageLength: number = 0;
 
     /**
-     * @param randomGenerator
+     * @param {IRandomGenerator} randomGenerator
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator
@@ -40,7 +40,7 @@ export abstract class ArrayStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param key
+     * @param {number} key
      * @returns {T}
      */
     public get (key: number): T {
@@ -54,8 +54,8 @@ export abstract class ArrayStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param value
-     * @returns {number | null}
+     * @param {T} value
+     * @returns {number}
      */
     public getKeyOf (value: T): number | null {
         const key: number = this.storage.indexOf(value);
@@ -85,7 +85,7 @@ export abstract class ArrayStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param args
+     * @param {any[]} args
      */
     public initialize (...args: any[]): void {
         this.storage = [];
@@ -93,8 +93,8 @@ export abstract class ArrayStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param storage
-     * @param mergeId
+     * @param {this} storage
+     * @param {boolean} mergeId
      */
     public mergeWith (storage: this, mergeId: boolean = false): void {
         this.storage = [...this.storage, ...storage.getStorage()];
@@ -105,8 +105,8 @@ export abstract class ArrayStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param key
-     * @param value
+     * @param {number} key
+     * @param {T} value
      */
     public set (key: number, value: T): void {
         if (key === this.storageLength) {

+ 10 - 10
src/storages/MapStorage.ts

@@ -26,7 +26,7 @@ export abstract class MapStorage <T> implements IStorage <T> {
     protected storage: Map <string | number, T>;
 
     /**
-     * @param randomGenerator
+     * @param {IRandomGenerator} randomGenerator
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator
@@ -35,7 +35,7 @@ export abstract class MapStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param key
+     * @param {string | number} key
      * @returns {T}
      */
     public get (key: string | number): T {
@@ -49,7 +49,7 @@ export abstract class MapStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param value
+     * @param {T} value
      * @returns {string | number | null}
      */
     public getKeyOf (value: T): string | number | null {
@@ -84,19 +84,19 @@ export abstract class MapStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param args
+     * @param {any[]} args
      */
     public initialize (...args: any[]): void {
-        this.storage = new Map <string | number, T> ();
+        this.storage = new Map <string | number, T>();
         this.storageId = this.randomGenerator.getRandomString(6);
     }
 
     /**
-     * @param storage
-     * @param mergeId
+     * @param {this} storage
+     * @param {boolean} mergeId
      */
     public mergeWith (storage: this, mergeId: boolean = false): void {
-        this.storage = new Map <string | number, T> ([...this.storage, ...storage.getStorage()]);
+        this.storage = new Map <string | number, T>([...this.storage, ...storage.getStorage()]);
 
         if (mergeId) {
             this.storageId = storage.getStorageId();
@@ -104,8 +104,8 @@ export abstract class MapStorage <T> implements IStorage <T> {
     }
 
     /**
-     * @param key
-     * @param value
+     * @param {string | number} key
+     * @param {T} value
      */
     public set (key: string | number, value: T): void {
         this.storage.set(key, value);

+ 1 - 1
src/storages/control-flow/ControlFlowStorage.ts

@@ -9,7 +9,7 @@ import { MapStorage } from '../MapStorage';
 @injectable()
 export class ControlFlowStorage extends MapStorage <ICustomNode> {
     /**
-     * @param randomGenerator
+     * @param {IRandomGenerator} randomGenerator
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator

+ 4 - 4
src/storages/custom-node-group/CustomNodeGroupStorage.ts

@@ -35,9 +35,9 @@ export class CustomNodeGroupStorage extends MapStorage <ICustomNodeGroup> {
     private readonly options: IOptions;
 
     /**
-     * @param customNodeGroupFactory
-     * @param randomGenerator
-     * @param options
+     * @param {TCustomNodeGroupFactory} customNodeGroupFactory
+     * @param {IRandomGenerator} randomGenerator
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNodeGroup) customNodeGroupFactory: TCustomNodeGroupFactory,
@@ -53,7 +53,7 @@ export class CustomNodeGroupStorage extends MapStorage <ICustomNodeGroup> {
     }
 
     public initialize (): void {
-        this.storage = new Map <string, ICustomNodeGroup> ();
+        this.storage = new Map <string, ICustomNodeGroup>();
         this.storageId = this.randomGenerator.getRandomString(6);
 
         CustomNodeGroupStorage.customNodeGroupsList.forEach((customNodeGroupName: CustomNodeGroup) => {

+ 4 - 4
src/storages/string-array/StringArrayStorage.ts

@@ -15,8 +15,8 @@ export class StringArrayStorage extends ArrayStorage <string> {
     private readonly arrayUtils: IArrayUtils;
 
     /**
-     * @param arrayUtils
-     * @param randomGenerator
+     * @param {IArrayUtils} arrayUtils
+     * @param {IRandomGenerator} randomGenerator
      */
     constructor (
         @inject(ServiceIdentifiers.IArrayUtils) arrayUtils: IArrayUtils,
@@ -30,7 +30,7 @@ export class StringArrayStorage extends ArrayStorage <string> {
     }
 
     /**
-     * @param args
+     * @param {any[]} args
      */
     public initialize (...args: any[]): void {
         super.initialize(args);
@@ -39,7 +39,7 @@ export class StringArrayStorage extends ArrayStorage <string> {
     }
 
     /**
-     * @param rotationValue
+     * @param {number} rotationValue
      */
     public rotateArray (rotationValue: number): void {
         this.storage = this.arrayUtils.arrayRotate(this.storage, rotationValue);

+ 1 - 0
src/templates/custom-nodes/self-defending-nodes/self-defending-unicode-node/SelfDefendingTemplate.ts

@@ -4,6 +4,7 @@ import { IEscapeSequenceEncoder } from '../../../../interfaces/utils/IEscapeSequ
  * SelfDefendingTemplate. Enters code in infinity loop.
  * Notice, that second and third call to recursiveFunc1('indexOf') has cyrillic `е` character instead latin
  *
+ * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
  * @returns {string}
  */
 export function SelfDefendingTemplate (escapeSequenceEncoder: IEscapeSequenceEncoder): string {

+ 1 - 0
src/templates/custom-nodes/string-array-nodes/string-array-calls-wrapper/SelfDefendingTemplate.ts

@@ -1,6 +1,7 @@
 import { IEscapeSequenceEncoder } from '../../../../interfaces/utils/IEscapeSequenceEncoder';
 
 /**
+ * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
  * @returns {string}
  */
 export function SelfDefendingTemplate (escapeSequenceEncoder: IEscapeSequenceEncoder): string {

+ 1 - 0
src/templates/custom-nodes/string-array-nodes/string-array-rotate-function-node/SelfDefendingTemplate.ts

@@ -3,6 +3,7 @@ import { IEscapeSequenceEncoder } from '../../../../interfaces/utils/IEscapeSequ
 /**
  * SelfDefendingTemplate. Enter code in infinity loop.
  *
+ * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
  * @returns {string}
  */
 export function SelfDefendingTemplate (escapeSequenceEncoder: IEscapeSequenceEncoder): string {

+ 7 - 7
src/utils/ArrayUtils.ts

@@ -12,7 +12,7 @@ export class ArrayUtils implements IArrayUtils {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
+     * @param {IRandomGenerator} randomGenerator
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator
@@ -21,8 +21,8 @@ export class ArrayUtils implements IArrayUtils {
     }
 
     /**
-     * @param length
-     * @return {number[]}
+     * @param {number} length
+     * @returns {number[]}
      */
     public arrayRange (length: number): number[] {
         const range: number[] = [];
@@ -35,8 +35,8 @@ export class ArrayUtils implements IArrayUtils {
     }
 
     /**
-     * @param array
-     * @param times
+     * @param {T[]} array
+     * @param {number} times
      * @returns {T[]}
      */
     public arrayRotate <T> (array: T[], times: number): T[] {
@@ -61,8 +61,8 @@ export class ArrayUtils implements IArrayUtils {
     }
 
     /**
-     * @param array
-     * @return {T[]}
+     * @param {T[]} array
+     * @returns {T[]}
      */
     public arrayShuffle <T> (array: T[]): T[] {
         const shuffledArray: T[] = [...array];

+ 10 - 9
src/utils/CryptUtils.ts

@@ -15,7 +15,7 @@ export class CryptUtils implements ICryptUtils {
     private readonly randomGenerator: IRandomGenerator;
 
     /**
-     * @param randomGenerator
+     * @param {IRandomGenerator} randomGenerator
      */
     constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator
@@ -23,10 +23,11 @@ export class CryptUtils implements ICryptUtils {
         this.randomGenerator = randomGenerator;
     }
 
+    /* tslint:disable */
     /**
-     * @param string
+     * @param {string} string
+     * @returns {string}
      */
-    /* tslint:disable */
     public btoa (string: string): string {
         const chars: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
 
@@ -55,9 +56,9 @@ export class CryptUtils implements ICryptUtils {
     /* tslint:enable */
 
     /**
-     * @param str
-     * @param length
-     * @returns {[string, string]}
+     * @param {string} str
+     * @param {number} length
+     * @returns {[string , string]}
      */
     public hideString (str: string, length: number): [string, string] {
         const escapeRegExp: (s: string) => string = (s: string) =>
@@ -96,15 +97,15 @@ export class CryptUtils implements ICryptUtils {
         return [randomMerge(str, randomStringDiff), randomStringDiff];
     }
 
+    /* tslint:disable */
     /**
      * RC4 symmetric cipher encryption/decryption
      * https://gist.github.com/farhadi/2185197
      *
-     * @param key
-     * @param string
+     * @param {string} string
+     * @param {string} key
      * @returns {string}
      */
-    /* tslint:disable */
     public rc4 (string: string, key: string): string {
         let s: number[] = [],
             j: number = 0,

+ 2 - 2
src/utils/EscapeSequenceEncoder.ts

@@ -10,8 +10,8 @@ export class EscapeSequenceEncoder implements IEscapeSequenceEncoder {
     private readonly stringsCache: Map <string, string> = new Map();
 
     /**
-     * @param string
-     * @param encodeAllSymbols
+     * @param {string} string
+     * @param {boolean} encodeAllSymbols
      * @returns {string}
      */
     public encode (string: string, encodeAllSymbols: boolean): string {

+ 10 - 10
src/utils/RandomGenerator.ts

@@ -45,11 +45,11 @@ export class RandomGenerator implements IRandomGenerator {
     /**
      * @type {ISourceCode}
      */
-    private readonly  sourceCode: ISourceCode;
+    private readonly sourceCode: ISourceCode;
 
     /**
-     * @param sourceCode
-     * @param options
+     * @param {ISourceCode} sourceCode
+     * @param {IOptions} options
      */
     constructor (
         @inject(ServiceIdentifiers.ISourceCode) sourceCode: ISourceCode,
@@ -71,8 +71,8 @@ export class RandomGenerator implements IRandomGenerator {
     }
 
     /**
-     * @param min
-     * @param max
+     * @param {number} min
+     * @param {number} max
      * @returns {number}
      */
     public getRandomFloat (min: number, max: number): number {
@@ -91,8 +91,8 @@ export class RandomGenerator implements IRandomGenerator {
     }
 
     /**
-     * @param min
-     * @param max
+     * @param {number} min
+     * @param {number} max
      * @returns {number}
      */
     public getRandomInteger (min: number, max: number): number {
@@ -103,8 +103,8 @@ export class RandomGenerator implements IRandomGenerator {
     }
 
     /**
-     * @param length
-     * @param pool
+     * @param {number} length
+     * @param {string} pool
      * @returns {string}
      */
     public getRandomString (length: number, pool: string = RandomGenerator.randomGeneratorPool): string {
@@ -112,7 +112,7 @@ export class RandomGenerator implements IRandomGenerator {
     }
 
     /**
-     * @param length
+     * @param {number} length
      * @returns {string}
      */
     public getRandomVariableName (length: number): string {

+ 6 - 6
src/utils/Utils.ts

@@ -7,7 +7,7 @@ export class Utils {
     public static readonly hexadecimalPrefix: string = '0x';
 
     /**
-     * @param dec
+     * @param {number} dec
      * @returns {string}
      */
     public static decToHex (dec: number): string {
@@ -17,7 +17,7 @@ export class Utils {
     }
 
     /**
-     * @param url
+     * @param {string} url
      * @returns {string}
      */
     public static extractDomainFromUrl (url: string): string {
@@ -35,7 +35,7 @@ export class Utils {
     }
 
     /**
-     * @param number
+     * @param {number} number
      * @returns {boolean}
      */
     public static isCeilNumber (number: number): boolean {
@@ -43,8 +43,8 @@ export class Utils {
     }
 
     /**
-     * @param string
-     * @param times
+     * @param {string} string
+     * @param {number} times
      * @returns {string}
      */
     public static stringRotate (string: string, times: number): string {
@@ -60,7 +60,7 @@ export class Utils {
     }
 
     /**
-     * @param string
+     * @param {string} string
      * @returns {string}
      */
     public static stringToJSFuck (string: string): string {

+ 45 - 0
tslint.json

@@ -1,10 +1,14 @@
 {
+  "extends": [
+    "tslint-eslint-rules"
+  ],
   "rules": {
     "align": [
       true,
       "parameters",
       "statements"
     ],
+    "array-bracket-spacing": [true, "never"],
     "ban": [
       true,
       [ "_", "forEach" ],
@@ -12,6 +16,8 @@
       [ "$", "each" ],
       [ "angular", "forEach" ]
     ],
+    "block-spacing": [true, "always"],
+    "brace-style": [true, "1tbs"],
     "class-name": true,
     "comment-format": [
       true,
@@ -53,21 +59,32 @@
       "timeEnd",
       "trace"
     ],
+    "no-constant-condition": true,
     "no-construct": true,
+    "no-control-regex": true,
     "no-debugger": true,
     "no-default-export": true,
+    "no-duplicate-case": true,
     "no-duplicate-variable": true,
     "no-empty": false,
+    "no-empty-character-class": true,
     "no-empty-interface": true,
     "no-eval": false,
+    "no-ex-assign": true,
+    "no-extra-boolean-cast": true,
+    "no-extra-semi": true,
     "no-inferrable-types": false,
+    "no-inner-declarations": [true, "both"],
     "no-internal-module": true,
+    "no-invalid-regexp": true,
     "no-invalid-this": true,
     "no-misused-new": true,
+    "no-multi-spaces": [true],
     "no-null-keyword": false,
     "no-parameter-properties": true,
     "no-reference": true,
     "no-reference-import": true,
+    "no-regex-spaces": true,
     "no-require-imports": false,
     "no-shadowed-variable": true,
     "no-string-literal": true,
@@ -75,10 +92,12 @@
     "no-switch-case-fall-through": false,
     "no-trailing-whitespace": false,
     "no-unnecessary-callback-wrapper": true,
+    "no-unexpected-multiline": true,
     "no-unused-expression": true,
     "no-use-before-declare": true,
     "no-var-keyword": true,
     "no-var-requires": false,
+    "object-curly-spacing": [true, "always"],
     "object-literal-sort-keys": false,
     "one-line": [
       true,
@@ -96,7 +115,27 @@
     "radix": true,
     "semicolon": [true, "always"],
     "space-before-function-paren": true,
+    "space-in-parens": [true, "never"],
     "switch-default": false,
+    "ter-arrow-parens": true,
+    "ter-func-call-spacing": [true, "never"],
+    "ter-indent": [
+      true,
+      4,
+      {
+        "ArrayExpression": 1,
+        "CallExpression": { "arguments": "first" },
+        "FunctionDeclaration": { "body": 1, "parameters": 1 },
+        "FunctionExpression": { "body": 1, "parameters": 1 },
+        "MemberExpression": 1,
+        "ObjectExpression": 1,
+        "outerIIFEBody": 1,
+        "SwitchCase": 1,
+        "VariableDeclarator": 1
+      }
+    ],
+    "ter-no-irregular-whitespace": [true],
+    "ter-no-sparse-arrays": [true],
     "trailing-comma": false,
     "triple-equals": [
       true,
@@ -132,6 +171,12 @@
     "typeof-compare": true,
     "unified-signatures": true,
     "use-isnan": true,
+    "valid-jsdoc": [true, {
+      "requireReturn": false,
+      "requireParamDescription": false,
+      "requireReturnDescription": false
+    }],
+    "valid-typeof": true,
     "variable-name": false,
     "whitespace": [
       true,

部分文件因文件數量過多而無法顯示