在 A 脚本中使用 B 脚本有以下几种情况
1、import {B} from "./B"
此时B中创建为export class B{}
2、import B from "./B"
区别上述1中有无{}
此时B中创建为export default class B{}
3、import * as b from "./B"
此时可改变B对外接口,把B换成了b,按正常情况对外接口和类名一样如上述1,2
这种方式好像只能导入定义枚举的文件(待查)
4、import b from "./B"
此时B中创建为export default class B{}
同时在B脚本中的类外改变对外接口export const b= new B();