In a .ts
file, I have the following code
export class SomeClass {
.
.
.
public someMethod() {
...
}
}
I want to call this someMethod
method in a .js
file.
I tried
import { SomeClass } from '../../../../SomeClass';
.
.
.
SomeClass.someMethod();
but got the following error:
someMethod is not a function
Do I have to make the method static
?
I prefer not because it calls other methods and I will have to make all of them static
.
Can I create an instance of this class in the .js
file?
Thanks!