自定义类:
export default class A{ public name:string; public getString(){ return this.name; } constructor(name:string){ this.name=name; } } import A from "./~" //路径 class B{ let a:A=new (); a.getString(); }