Static properties
const PrintMyself = stampit({
statics: {
myProperty: 'foo',
printMyself() {
console.log(this)
}
}
})
PrintMyself.myProperty === 'foo'
PrintMyself.printMyself() // call the function without creating an instance of the stampconst Server = stampit(PrintMyself, {
...
})
Server.printMyself()Using statics to compose in your own way
Descriptor merging algorithm
Other ways to add static properties
Last updated