I want to create a Javascript class that I can instantiate from a Vue component and call functions on it like in C#.
public class MyClass()
{
public MyClass(string someParameter){
....initialization code using "someParameter"
}
public String SomeProperty {get; set;}
public void MyClassMethod(){
....my code goes here
}
}
In Vue, I'd import JavaScript "functions" using the "Import" keyword but here I'd like to import the entire object and call the functions on it. I'm thinking that an IFFE might be the way but not sure. My question is 1) is it possible and 2) if so, how should I structure it AND how would I call/or instantiate the object from Vue code?