mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
TS 2.0 Strict Null Checks refactoring
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import * as esprima from 'esprima';
|
||||
import * as escodegen from 'escodegen';
|
||||
|
||||
import { IObfuscatorOptions } from "./interfaces/IObfuscatorOptions";
|
||||
import { IGeneratorOutput } from "./interfaces/IGeneratorOutput";
|
||||
import { INode } from './interfaces/nodes/INode';
|
||||
import { IObfuscationResult } from "./interfaces/IObfuscationResult";
|
||||
import { IOptions } from './interfaces/IOptions';
|
||||
import { IOptionsPreset } from "./interfaces/IOptionsPreset";
|
||||
|
||||
import { TSourceMapMode } from "./types/TSourceMapMode";
|
||||
|
||||
@@ -45,11 +45,14 @@ export class JavaScriptObfuscatorInternal {
|
||||
|
||||
/**
|
||||
* @param sourceCode
|
||||
* @param customOptions
|
||||
* @param obfuscatorOptions
|
||||
*/
|
||||
constructor (sourceCode: string, customOptions?: IOptionsPreset) {
|
||||
constructor (sourceCode: string, obfuscatorOptions?: IObfuscatorOptions) {
|
||||
this.sourceCode = sourceCode;
|
||||
this.options = new Options(customOptions);
|
||||
|
||||
if (obfuscatorOptions) {
|
||||
this.options = new Options(obfuscatorOptions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user