If I'm understanding correctly, you have a js file with functions. Inside of those functions, you're calling art return value?
I'm guessing that's not allowed because construct cannot know that you only plan to use those functions wrapped in function events.
Could you return values from your js functions, and then use inline event block js to call set return value, using the returned value from you js function?