Comparing version 0.10.4 to 0.11.0
@@ -67,3 +67,4 @@ // ---------------------------------------------------------------------------- | ||
// Check for any __ondefine__ from the parents | ||
// Check for any __ondefine__ from the parents. This gives a class, at | ||
// define time, access to the Child we've just created as well the raw hash | ||
var onDefine = function(C) { | ||
@@ -73,3 +74,3 @@ _(C.__parents__).each(onDefine); | ||
if (C.__ondefine__) | ||
C.__ondefine__(Child); | ||
C.__ondefine__(Child, hash); | ||
}; | ||
@@ -76,0 +77,0 @@ onDefine(Child); |
{ | ||
"name": "typedef", | ||
"version": "0.10.4", | ||
"version": "0.11.0", | ||
"description": "Familiar classes, mixins, and interfaces in ES5 Javascript. Member decorations for powerful objects that keep your code DRY", | ||
@@ -5,0 +5,0 @@ "main": "lib/typedef.js", |
@@ -46,1 +46,10 @@ var typedef = require('../../lib/typedef'); | ||
}); | ||
test('Mixins', 1, function() { | ||
var M = typedef.mixin('M').define({ | ||
__ondefine__: function() { ok(true, 'mixin ondefine fired'); } | ||
}); | ||
var C = typedef.class('C').uses(M).define(); | ||
}); |
105558
3128