JSFiddle - React, Tailwind, and code Playground
by Deepak Anand
JavaScript
// Using Dojo declare for java-style class inheritance
// specifying different parameters in extended methods
require([
"dojo/_base/declare"
], function(declare){
var SuperClass = declare(null, {
superMethod: function(a, b, c){
console.log(a+b+c);
}
});
var SubClass = declare(SuperClass, {
superMethod: function(foo){
this.inherited(arguments, ["bar", "baz"]);
}
});
var subclassInstance = new SubClass();
subclassInstance.superMethod();
});