How is this inheritance realized

  node.js, question

Thinkjs
Think.controller.base is not introduced or defined in this file. how is think.controller.base inherited?

//base.js
 export default class extends think.controller.base {
 /**
 * some base method in here
 */
 bracket

What should I write in main?

//main.js
 ?
 
 //A.js
 export default class {
 constructor(a,b){
 this.a=a;
 this.b=b;
 bracket
 bracket
 
 //B.js
 export default class extends A{
 echo(){
 console.log(this.a,this.b);
 bracket
 bracket

AboutthinkJSWhy not introduce insidethinkKeyword, can be directly used by the problem, seeHere, the reason is also very simple, is the framework at runtime, putthinkKeyword becomes global variable.

As for the second question, I still don’t understand. How to write something?