We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae8fa05 commit 7a90a81Copy full SHA for 7a90a81
types/index.d.ts
@@ -153,12 +153,20 @@ export type RuleSerializable = Pick<
153
"conditions" | "event" | "name" | "priority"
154
>;
155
156
+export type RuleResultSerializable = Pick<
157
+ Required<RuleResult>,
158
+ "name" | "conditions" | "event" | "priority" | "result">
159
+
160
export interface RuleResult {
161
name: string;
162
conditions: TopLevelCondition;
163
event?: Event;
164
priority?: number;
165
result: any;
166
+ toJSON(): string;
167
+ toJSON<T extends boolean>(
168
+ stringify: T
169
+ ): T extends true ? string : RuleResultSerializable;
170
}
171
172
export class Rule implements RuleProperties {
0 commit comments