Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Promise.all(
- ['ParentClass.js', 'MemberClass.js'].map(x => System.import(x)))
- .then(([ParentClass, MemberClass]) => {
- function ChildClass() {}
- ChildClass.prototype = new ParentClass();
- ChildClass.prototype.init = function() {
- ParentClass.prototype.init.call(this);
- console.log('child init');
- this.member = new MemberClass().init();
- return this;
- };
- ChildClass.prototype.say = function(something) {
- console.log('ChildClass say: ' + something);
- this.member.say(' also ' + something);
- }
- exports = ChildClass;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement