CacheControl / CacheControl/json-rules-engine
Accessing Event on a Rule
- 主要语言
- JavaScript
- 星标
- 3.1k
- 派生
- 507
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello,
I'm working on a project in node that uses your rule engine, and I've noticed something that I can't understand.
The Rule class definition implements:
`export class Rule implements RuleProperties {
event: Event;
}`
But the Rule object uses
`ruleEvent: {}`
Trying to access a rule's events with `rule.event` returns nothing (as expected).
I've looked at the js code and there's a method `getEvent()`, that is not in index.d.ts.
What's the reason for all of this?
It seems it's impossible to access the event data.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先比较 Rule 类定义、ruleEvent 对象、JavaScript getEvent() 方法,以及 issue 中提到的 index.d.ts 声明。追踪事件数据的表示和公开方式,然后验证公开行为与类型声明是否一致;当访问事件数据的受支持方式清晰明确且得到准确表示时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100