Closed ghost closed 3 years ago
Hey Jarrod,
I am trying to use the refactor-utilities-common package with the refactor session however I am running into issues.
Code:
const { RefactorSession, refactor } = require("shift-refactor"); const commonMethods = require('refactor-plugin-common'); const fileContents = require("fs").readFileSync("test_tick.js", { encoding: "utf8" }); let ast = parseScript(fileContents); const $script = refactor(ast, commonMethods);
const { RefactorSession, refactor } = require("shift-refactor");
const commonMethods = require('refactor-plugin-common');
const fileContents = require("fs").readFileSync("test_tick.js", { encoding: "utf8" });
let ast = parseScript(fileContents);
const $script = refactor(ast, commonMethods);
Error:
Object.assign(this, plugin(this)); ^
Object.assign(this, plugin(this));
TypeError: plugin is not a function
Hey Jarrod,
I am trying to use the refactor-utilities-common package with the refactor session however I am running into issues.
Code:
const { RefactorSession, refactor } = require("shift-refactor");
const commonMethods = require('refactor-plugin-common');
const fileContents = require("fs").readFileSync("test_tick.js", { encoding: "utf8" });
let ast = parseScript(fileContents);
const $script = refactor(ast, commonMethods);
Error:
Object.assign(this, plugin(this));
^TypeError: plugin is not a function