You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to make some modifications to OpenSTF and am encountering some issues when trying to interact between classes. This appears to be due to STF-Syrup's dependency injection blocking functions from an external scope.
In short, I would like to be able to reference functions in bar.js (Uses Syrup) FROM foo.js (Does not use Syrup). I can successfully require and assign bar.js, but instead of a typical class object, I receive a SerialSyrup object that util.inspect shows is constructed like this:
Every attempt to reference functions that exist within the "module.exports" block fails with "...is not a function". Is there a way I can reach inside this block, other than totally refactoring foo.js to be a Syrup module and importing bar.js as a dependency?
The text was updated successfully, but these errors were encountered:
Hello,
I am attempting to make some modifications to OpenSTF and am encountering some issues when trying to interact between classes. This appears to be due to STF-Syrup's dependency injection blocking functions from an external scope.
In short, I would like to be able to reference functions in bar.js (Uses Syrup) FROM foo.js (Does not use Syrup). I can successfully require and assign bar.js, but instead of a typical class object, I receive a SerialSyrup object that util.inspect shows is constructed like this:
Every attempt to reference functions that exist within the "module.exports" block fails with "...is not a function". Is there a way I can reach inside this block, other than totally refactoring foo.js to be a Syrup module and importing bar.js as a dependency?
The text was updated successfully, but these errors were encountered: