Accessing Event on a Rule

未關閉
#307 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
javascript
領域
backend

研究方向

首先比較 Rule 類別定義、ruleEvent 物件、JavaScript getEvent() 方法,以及 issue 中提到的 index.d.ts 宣告。追蹤事件資料的表示方式與公開方式,接著確認公開行為與型別宣告是否一致;當存取事件資料的支援方式清楚且有準確表示時,即代表完成。

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
JavaScript
星號
3.1k
分支
507
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CacheControl/json-rules-engine 的其他 Issue

查看 CacheControl/json-rules-engine 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。