UNPKG

@kezios/forest-express-decorator

Version:
22 lines (21 loc) • 973 B
import { hookFunction } from './../types/SmartAction'; import { BaseCollection } from './../core/BaseCollection'; import { BaseSmartAction } from './../core/BaseSmartAction'; import { SmartActionFieldOptions, SMART_ACTION_TYPE } from '../types'; interface SmartActionOptions { label: string; type: SMART_ACTION_TYPE; onLoad?: hookFunction; } declare const SmartAction: (options: SmartActionOptions) => <T extends new (...args: any[]) => {}>(constructor: T) => { new (...args: any[]): { label: string; type: SMART_ACTION_TYPE; onLoad: hookFunction | undefined; }; } & T; declare function SmartActionIntegration<Type extends BaseSmartAction>(classSmartAction: { new (): Type; }): (target: BaseCollection, propertyKey: string) => void; declare const SmartActionField: (options: SmartActionFieldOptions) => (target: BaseSmartAction, propertyKey: string) => void; export { SmartAction, SmartActionField, SmartActionIntegration };