28 lines
599 B
TypeScript
28 lines
599 B
TypeScript
|
|
abstract class Service {
|
|
private name: string;
|
|
protected constructor(name: string) {
|
|
this.name = name;
|
|
}
|
|
|
|
protected send(methodName: string, params?: string[] | string): Promise<string> {
|
|
return new Promise<string>(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);
|
|
}
|
|
}
|