UNPKG

@opra/common

Version:
25 lines (24 loc) 1.04 kB
import type { ThunkAsync, Type } from 'ts-gems'; import type { WSOperation } from '../ws/ws-operation.js'; export interface WSOperationDecorator { (target: Object, propertyKey: string): void; UseType(...type: Type[]): this; } /** * @namespace WSOperationDecoratorFactory */ export interface WSOperationDecoratorFactory { /** * Property decorator * @param decoratorChain * @param type * @param options */ <T extends WSOperation.Options>(decoratorChain: Function[], type: ThunkAsync<Type> | string, options?: T): WSOperationDecorator; } export declare namespace WSOperationDecoratorFactory { type AugmentationFunction = (decorator: WSOperationDecorator, decoratorChain: Function[], options?: WSOperation.Options) => void; } export declare function WSOperationDecoratorFactory(decoratorChain: Function[], options?: WSOperation.Options): WSOperationDecorator; export declare namespace WSOperationDecoratorFactory { var augment: (fn: WSOperationDecoratorFactory.AugmentationFunction) => void; }