UNPKG

@zxh19890103/wik

Version:

The world-class JavaScript library for building large-scale digital warehouse both on 2D and 3D.

36 lines (35 loc) 851 B
import { Base } from './Base.class'; export type EffectCallReq = { /** * the subject of effect */ cause?: Base; /** * cuz by, a method name on cause. */ by: string; /** * effect name */ effect: string; /** * arguments of by */ payload: any; }; type EffectNameDescriptor<N extends string> = N | { /** * is the method name & signatures the same to that on the views? default is false. */ self?: boolean; /** * the name of effect, whose whenEffect will be called on views. */ name?: N; /** * add prefix 'when', default is true */ prefix?: boolean; }; export declare function effect<N extends string = string>(...names: EffectNameDescriptor<N>[]): (target: any, field: string, descriptor: PropertyDescriptor) => void; export {};