Created
September 8, 2021 13:25
-
-
Save LevanKvirkvelia/2e12746a26639a91610f1d2364ab33c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/decompilers/es6/importsToEs6.ts b/src/decompilers/es6/importsToEs6.ts | |
index d5290b6..316d50d 100644 | |
--- a/src/decompilers/es6/importsToEs6.ts | |
+++ b/src/decompilers/es6/importsToEs6.ts | |
@@ -49,6 +49,7 @@ export default class ImportsToEs6 extends Plugin { | |
}, | |
}); | |
const [newPath] = varDeclar.parentPath.insertBefore(t.importDeclaration([t.importDefaultSpecifier(varIdentifier)], path.node.arguments[0])); | |
+ // @ts-ignore | |
newPath.scope.registerBinding('module', newPath); | |
varDeclar.remove(); | |
return; | |
diff --git a/src/decompilers/evaluators/defaultInteropEvaluator.ts b/src/decompilers/evaluators/defaultInteropEvaluator.ts | |
index 568758b..4b303ae 100644 | |
--- a/src/decompilers/evaluators/defaultInteropEvaluator.ts | |
+++ b/src/decompilers/evaluators/defaultInteropEvaluator.ts | |
@@ -22,8 +22,6 @@ import { | |
isIdentifier, | |
} from '@babel/types'; | |
import { Plugin } from '../../plugin'; | |
-import Module from '../../module'; | |
-import CmdArgs from '../../interfaces/cmdArgs'; | |
/** | |
* Evaluates babel default interops | |
diff --git a/src/editors/converters/babelInlineConverters.ts b/src/editors/converters/babelInlineConverters.ts | |
index dba54c4..ec3d04b 100644 | |
--- a/src/editors/converters/babelInlineConverters.ts | |
+++ b/src/editors/converters/babelInlineConverters.ts | |
@@ -97,6 +97,7 @@ export default class BabelInlineConverters extends Plugin { | |
this.debugLog('removed inline babel interopRequireDefault inline:'); | |
this.debugLog(this.debugPathToCode(path)); | |
+ // @ts-ignore | |
this.mergeBindings(path, node.id.name, moduleSourcePath.node.id.name); | |
path.scope.bindings[test.left.left.name].path.remove(); | |
diff --git a/src/plugin.ts b/src/plugin.ts | |
index 04798e1..3993dcf 100644 | |
--- a/src/plugin.ts | |
+++ b/src/plugin.ts | |
@@ -60,6 +60,7 @@ export abstract class Plugin { | |
protected debugLog(...args: unknown[]): void { | |
if (args.length === 0) throw new Error('no args'); | |
+ // @ts-ignore | |
debug(this.getDebugName())(...args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment