I'm pretty new to java-/type-script and I've some troubles grasping their concepts. I would like to call a method of another class. However, I've been unsuccessful so far.
export class Foo {
calcSomeThing(parameter:number): number {
//stuff
}
}
class Bar {
var foo:Foo = new Foo();
calcOtherThing() {
result = foo.calcSomething(parameter)
}
}
What is the correct way to call calcSomething on foo from calcOtherThing?
edit: added an instance of foo
Footo my code.this.. So,this.foo.thisthing was pretty dumb. Thank you all.