请教,如何自定义模块?

创建一个纯TS项目,通过rollup或者TSC 编译生成js和.d.ts两个文件以供cocos creator使用
假设项目就以下一个文件
export class test {
constructor() {
//
}

/**
 * test
 */
public test() {
    console.log('11111');
}

}

现在我通过rollup esm模式编译后,在cocos creator中报错