if a method returns this - it is inferred as the class where a method was defined, and this will break chaining if used with child class.
typescript has special type this that is polymorphic and solves this issues
it would be great if hegel would correctly infer this for such cases
https://jsmonk.github.io/hegel/try#MYGwhgzhAEBCkEtgGEwmAV3AFwPYCdoBvAKGnOgDc0MBTALmgDsMBbAI1sIF5oAGANwkyFYLiYRs+DMDz4AFNRB1ovPgEpiIihWwALBBAB0Slb1O0hOgL7bomfPlpNsANRq156xiw5ctOjpO2Bj4TND6hiYeVhS2OmAAJonyuAAOXGBMiT5snPiapIG6BsYW0ADUvOmZ2bHFwaHhkRD10La2JKCQMADKwAjO2AgAZkio6FhgctC0AB7Yzokw8BDjaJg4BAH24pLSsgSKHqr8hXYQGBkKFuqx8dBrTF475C3RyrSnALLTekZPeTvW5tRphCKle4kTpiCTYaCJU5MWgAd2g-UGLlG60mWwUACZ1CIjEkUgBGInkAEIZ6U6BGBxOFzuT5eARAA
if a method returns this - it is inferred as the class where a method was defined, and this will break chaining if used with child class. typescript has special type
this
that is polymorphic and solves this issues it would be great if hegel would correctly inferthis
for such cases