https://pulumi.com logo
#typescript
Title
# typescript
c

curved-ghost-20494

05/19/2020, 2:49 AM
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

little-cartoon-10569

05/19/2020, 3:14 AM
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

faint-table-42725

05/19/2020, 2:42 PM
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.