ts-helpers icon indicating copy to clipboard operation
ts-helpers copied to clipboard

variance modifier wrapper function

Open DetachHead opened this issue 3 years ago • 1 comments

sometimes you need to write a function with the old function syntax (eg. to access super or to make a generator) but still want to leverage the variance checks that arrow functions have

something like

class Foo {
    foo = toArrowFunction(function() {
        super.foo()
    })
}

(idk if this will work)

DetachHead avatar Jul 15 '22 05:07 DetachHead

that example doesn't work because it needs to be a method not a function

DetachHead avatar Jul 24 '22 01:07 DetachHead