fogine / couchbase-odm

CouchbaseODM is a promise-based Node.js ODM for Couchbase
https://fogine.github.io/couchbase-odm
MIT License
12 stars 3 forks source link

abstract contructor #9

Closed jurajsimbs closed 8 years ago

jurajsimbs commented 8 years ago

constructor in https://github.com/fogine/couchbase-odm/blob/master/lib/hook.js#L31

should throw error (because it is defined as abstract) to avoid direct call

fogine commented 8 years ago

Hook methods are bound to static object so It should throw a TypeError if you try to extend it as Hook object does not have any prototype set. It's not possible to instantiate new Hook object as well. The thing is, the Hook object should not be a part of public API. I'll remove it.

jurajsimbs commented 8 years ago

ah yes you're right. I totally overlooked it was static... my bad.