Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Fluent interfaces do not work #111

Open
srg-kostyrko opened this issue Apr 13, 2020 · 1 comment
Open

Fluent interfaces do not work #111

srg-kostyrko opened this issue Apr 13, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@srg-kostyrko
Copy link
Contributor

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 infer this for such cases

@JSMonk
Copy link
Owner

JSMonk commented Apr 14, 2020

Oh, thank you. It's an important thing. We will fix it soon.
Thank you a lot for your contribution ^_^.

@JSMonk JSMonk added the bug Something isn't working label Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants