07-10-2019 11:15 AM
Hi
I have a use case where I am looking forward to access methods of one library(expression file) from another library (expression file 2).
Is their a way to achieve this?
Solved! Go to Solution.
07-18-2019 11:04 AM
07-17-2019 09:44 AM
No, why would you think that’s the case?
The libraries should be cached in the Snaplex node memory, so having more than one should not affect performance greatly. If you are seeing a performance issue, that might be a bug that needs to be fixed.
07-17-2019 09:52 AM
Thanks for the help @tstack
07-17-2019 09:53 AM
@Kulashekharan FYI
07-17-2019 04:52 PM
Hi @tstack by global scope in my query. I meat I have a expression file where we can decalre a function on top level which could be accessed from anywhere in the object(same expression file) using something like globalthis Or this (basically " this context" which would resolve at any herarical level throughout the file)
07-17-2019 10:05 PM
I think I understand now… Take a look at the Object Literal documentation where it mentions some of the variables that you can use to reference other parts of a nested literal. I think probably want to use __root__
for your situation.
Maybe something like the following (I haven’t tried it out):
{
value: 42,
child: {
adder: x => __root__.value + x
}
}