mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Move all packages to a types directory
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for javascript-obfuscator
|
||||
// Project: https://github.com/sanex3339/javascript-obfuscator
|
||||
// Definitions by: sanex3339 <https://github.com/sanex3339>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module 'javascript-obfuscator' {
|
||||
export interface IOptions {
|
||||
compact?: boolean;
|
||||
debugProtection?: boolean;
|
||||
debugProtectionInterval?: boolean;
|
||||
disableConsoleOutput?: boolean;
|
||||
encodeUnicodeLiterals?: boolean;
|
||||
reservedNames?: string[];
|
||||
rotateUnicodeArray?: boolean;
|
||||
selfDefending?: boolean;
|
||||
unicodeArray?: boolean;
|
||||
unicodeArrayThreshold?: number;
|
||||
wrapUnicodeArrayCalls?: boolean;
|
||||
[id: string]: any;
|
||||
}
|
||||
|
||||
export class JavaScriptObfuscator {
|
||||
public static obfuscate (sourceCode: string, customOptions?: IOptions): string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { JavaScriptObfuscator } from 'javascript-obfuscator';
|
||||
|
||||
let sourceCode1: string = JavaScriptObfuscator.obfuscate('var foo = 1;');
|
||||
let sourceCode2: string = JavaScriptObfuscator.obfuscate('var foo = 1;', {
|
||||
compact: true,
|
||||
debugProtection: false,
|
||||
debugProtectionInterval: false,
|
||||
disableConsoleOutput: true,
|
||||
encodeUnicodeLiterals: false,
|
||||
reservedNames: ['^foo$'],
|
||||
rotateUnicodeArray: true,
|
||||
selfDefending: true,
|
||||
unicodeArray: true,
|
||||
unicodeArrayThreshold: 0.8,
|
||||
wrapUnicodeArrayCalls: true
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"javascript-obfuscator-tests.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user