1 | import { IAction, IInteractionContext, LooseObject } from '../../interface';
|
2 |
|
3 |
|
4 |
|
5 | declare abstract class Action<T = LooseObject> implements IAction {
|
6 |
|
7 | name: any;
|
8 |
|
9 | context: IInteractionContext;
|
10 |
|
11 | protected cfg: T;
|
12 |
|
13 | protected cfgFields: string[];
|
14 | constructor(context: IInteractionContext, cfg?: T);
|
15 | /**
|
16 | * 设置配置项传入的值
|
17 | * @param cfg
|
18 | */
|
19 | protected applyCfg(cfg: any): void;
|
20 | /**
|
21 | * Inits action,提供给子类用于继承
|
22 | */
|
23 | init(): void;
|
24 | /**
|
25 | * Destroys action
|
26 | */
|
27 | destroy(): void;
|
28 | }
|
29 | export default Action;
|