Почти изящное решение
/**
* @abstract
*/
class AbstractHttpService {
baseRouteName;
constructor(baseRouteName) {
this.baseRouteName = baseRouteName ?? new.target.baseRouteName;
}
}
class ProductsHttpService extends AbstractHttpService {
static baseRouteName = 'product';
}
let x = new ProductsHttpService ()
console.log (x.baseRouteName)