Advertisement
Guest User

Untitled

a guest
Sep 1st, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Promise.all(
  2.         ['ParentClass.js', 'MemberClass.js'].map(x => System.import(x)))
  3.     .then(([ParentClass, MemberClass]) => {
  4.  
  5.   function ChildClass() {}
  6.  
  7.   ChildClass.prototype = new ParentClass();
  8.  
  9.   ChildClass.prototype.init = function() {
  10.  
  11.     ParentClass.prototype.init.call(this);
  12.  
  13.     console.log('child init');
  14.     this.member = new MemberClass().init();
  15.  
  16.     return this;
  17.   };
  18.  
  19.   ChildClass.prototype.say = function(something) {
  20.     console.log('ChildClass say: ' + something);
  21.     this.member.say(' also ' + something);
  22.   }
  23.  
  24.   exports = ChildClass;
  25.  
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement