I cannot get past needing to reference a method on...
# typescript
c
I cannot get past needing to reference a method on a class from another method
Copy code
class Foo {
  bar () {
   return 'bar'
  }
  baz () {
   return this.bar()
  }
}
l
I guess it helps with situations like this?
Copy code
bar() {
  return 'urk'
}
class Foo {
  bar () {
   return 'bar'
  }
  baz () {
   return `${bar()}${this.bar()}` // Returns "urkbar"
  }
}
f
I saw you filed a GH issue and replied there. But in case you don’t see it; you can wrap the whole thing in a callback factory for the correct behavior.