abstract class Service { private name: string; protected constructor(name: string) { this.name = name; } protected send(methodName: string, params?: string[] | string): Promise { return new Promise(resolve => { resolve(''); }); } } export default Service; export function dService(...methodNames: string[]): Function { return function(owner: any, methodName?: string): void { if (!owner.prototype) { handleActionReducer(owner, methodName); return; } handleRootReducer(owner, methodNames); } }