There is such a code. And I can't figure out how to describe the type of the child class with JSDoc. That is, the Model.find method Model.find not describe that this method returns the model that is the current context of this method at the time of the call.

As a result, the IDE cannot autocomplete the properties of the Cat class and offers only the properties of the Model class (in my case).

 // Базовая модель class Model { /** * @return {Model} */ static find() { /* как-то ищет модель и возвращает её */ } } // Дочерняя модель class Cat extends Model {} // Собираюсь использовать это так const cat = Cat.find(); // разумеется в переменной cat будет экземпляр класса Cat, а не Model 

I would like to write something like self or the like. No one knows how to do this?

    0