Skip to content

Comments

Parent#12

Open
tanhauhau wants to merge 2 commits intoaemkei:masterfrom
tanhauhau:parent
Open

Parent#12
tanhauhau wants to merge 2 commits intoaemkei:masterfrom
tanhauhau:parent

Conversation

@tanhauhau
Copy link
Contributor

Solving issue #11 and applying this to parent

var A = Model({x: 1,
    y: 2,
    z: function(){ console.log(this.x); }
    });
var B = A.extend({x: 3});

var a = new A();
var b = new B();

a instanceof A; //return true
b instanceof B; //return true
b instanceof A; //return true

a.z(); // return 1
b.z(); // return 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant