I have two examples one I have a group of functions like this:
const funcs = () => {
const foo = (t: string) => `${t} meow`
const bar = (t: string) => `${t} woof`
return { foo, bar }
}
The other is just a stand alone function:
const foo = (t: string) => `${t} meow`
How can I add these to an existing class:
class Example {
}
I'm open to decorators, ideally I don't have to open up the constructor.
bar = foo;like typescriptlang.org/play/….