openlayers / openlayers

OpenLayers
https://openlayers.org
BSD 2-Clause "Simplified" License
11.29k stars 3.03k forks source link

Use ES6 classes and inheritance #8328

Closed gberaudo closed 6 years ago

gberaudo commented 6 years ago

The OpenLayers5 code is using constructor functions and inheritance using util.inherits(). ES6 introduced the concept of class which:

I have started experimenting with lebab for transforming our 250 constructors to classes. Before I invest more time:

gberaudo commented 6 years ago

@ahocevar, have you had time to investigate typescript already? What is your opinion about this issue?

ahocevar commented 6 years ago

@gberaudo I didn't have time to investigate that yet.

tschaub commented 6 years ago

@gberaudo contributions welcome on #8385. I've run an auto-transform and done a fair bit of manual cleanup. Remaining work is listed on that PR.