refactor: use type which is closer to pre-defined typescript type for answer.ts
This commit is contained in:
parent
09d609f414
commit
846a64f993
|
@ -1,6 +1,6 @@
|
|||
import { registerHandler } from '../ipc-server';
|
||||
|
||||
export function answer(channel: IpcChannel): DecoratorFactory<IIpcController> {
|
||||
export function answer(channel: IpcChannel): IpcControllerMethodDecorator {
|
||||
return function (target: IIpcController, propertyKey): void {
|
||||
registerHandler(channel, target, propertyKey);
|
||||
};
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
type DecoratorFactory<T> = (target: T, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* @see MethodDecorator
|
||||
*/
|
||||
type IpcControllerMethodDecorator = <T>(target: IIpcController, propertyKey: string, descriptor: TypedPropertyDescriptor<T>) => void
|
Loading…
Reference in New Issue