2020-10-09 19:35:46 +02:00
|
|
|
import InteropService_Importer_Base from './InteropService_Importer_Base';
|
|
|
|
import { ImportExportResult, Module } from './types';
|
|
|
|
|
|
|
|
export default class InteropService_Importer_Custom extends InteropService_Importer_Base {
|
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
private module_: Module = null;
|
2020-10-09 19:35:46 +02:00
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
constructor(handler: Module) {
|
2020-10-09 19:35:46 +02:00
|
|
|
super();
|
|
|
|
this.module_ = handler;
|
|
|
|
}
|
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
async exec(result: ImportExportResult) {
|
2020-10-09 19:35:46 +02:00
|
|
|
return this.module_.onExec({
|
|
|
|
sourcePath: this.sourcePath_,
|
|
|
|
options: this.options_,
|
|
|
|
warnings: result.warnings,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|