-
Notifications
You must be signed in to change notification settings - Fork 503
Closed
Description
RuleResult has a toJSON() method (source)
The RuleResult interface declaration does not include this (source). Also, there is no class declaration for RuleResult.
The impact of this issue is felt when handling rule results, in my case decomposing them from an EngineResult. I ran into the same problem outlined in #172 which was "resolved" with the introduction of the toJSON method to RuleResults. This resolution doesn't help if you're using typescript, as the compiler has no knowledge of this method.
To make my code work around this, I've had to create a new RuleResult type in my code and extend it to include the toJSON method, which is a bit yuck.
A good solution would include:
- add and export a
RuleResultclass declaration which includes thetoJSON()method - add and export a
RuleResultSerializabletype declaration (taking inspiration from the type declaration forRuleclass declaration)
Thanks
Metadata
Metadata
Assignees
Labels
No labels