Skip to content

Commit 1356b48

Browse files
result and factResult are not always there
1 parent 725fb66 commit 1356b48

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ export class Rule implements RuleProperties {
187187
}
188188

189189
interface BooleanConditionResultProperties {
190-
result: boolean
190+
result?: boolean
191191
}
192192

193193
interface ConditionResultProperties extends BooleanConditionResultProperties {
194-
factResult: any
194+
factResult?: unknown
195195
}
196196

197197
interface ConditionProperties {

Diff for: types/index.test-d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ const topLevelConditionResult = result.then(r => r.results[0].conditions);
137137
expectType<Promise<TopLevelConditionResult>>(topLevelConditionResult)
138138

139139
const topLevelAnyConditionsResult = topLevelConditionResult.then(r => (r as AnyConditionsResult).result);
140-
expectType<Promise<boolean>>(topLevelAnyConditionsResult)
140+
expectType<Promise<boolean | undefined>>(topLevelAnyConditionsResult)
141141

142142
const topLevelAllConditionsResult = topLevelConditionResult.then(r => (r as AllConditionsResult).result);
143-
expectType<Promise<boolean>>(topLevelAllConditionsResult)
143+
expectType<Promise<boolean | undefined>>(topLevelAllConditionsResult)
144144

145145
const topLevelNotConditionsResult = topLevelConditionResult.then(r => (r as NotConditionsResult).result);
146-
expectType<Promise<boolean>>(topLevelNotConditionsResult)
146+
expectType<Promise<boolean | undefined>>(topLevelNotConditionsResult)
147147

148148
// Alamanac tests
149149
const almanac: Almanac = (await engine.run()).almanac;

0 commit comments

Comments
 (0)