我有一个Javascript类(在ES6中)已经很长了.为了更好地组织它,我想将它分成2或3个不同的文件.我怎样才能做到这一点?
目前它在单个文件中看起来像这样:
class foo extends bar {
constructor(a, b) {} // Put in file 1
methodA(a, b) {} // Put in file 1
methodB(a, b) {} // Put in file 2
methodC(a, b) {} // Put in file 2
}
Run Code Online (Sandbox Code Playgroud)
谢谢!