How to let typescript infers type of `this` in nested scope? I use typescript v5.4.5 (playground) and have an issue. There is my code example