Posts tagged 'abstract'
Tag: abstract
Abstract classes in Javascript Signature Post
July 8, 2021
Javascript don’t have the concept of abstract classes, but it’s fairly easy to
implement: don’t allow to instanciate them :-) Just check if the constructor
of the instance we are creating is the own class instead of one of its
childrens, and don’t throw an error if it is: