| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 2x 2x | import Core from './Core';
export default interface Renderer {
// 前置处理方法
pre?(modules: any): any;
// 后置处理方法
post?(modules: any): any;
}
export default abstract class Renderer {
// @ts-ignore
protected config: Object;
// @ts-ignore
protected context: Core;
constructor(config: Object = {}, context: Core) {
Object.assign(this, {
config,
context,
});
}
}
|