@openmrs/esm-expression-evaluator 6.3.1-pre.3106 → 6.3.1-pre.3119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/dist/evaluator.d.ts +2 -2
- package/package.json +1 -1
- package/src/evaluator.ts +2 -1
package/.turbo/turbo-build.log
CHANGED
package/dist/evaluator.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ export declare function evaluateAsync(expression: string | jsep.Expression, vari
|
|
|
147
147
|
* the expression.
|
|
148
148
|
* @returns The result of evaluating the expression
|
|
149
149
|
*/
|
|
150
|
-
export declare function evaluateAsBoolean(expression: string | jsep.Expression, variables?: VariablesMap):
|
|
150
|
+
export declare function evaluateAsBoolean(expression: string | jsep.Expression, variables?: VariablesMap): boolean;
|
|
151
151
|
/**
|
|
152
152
|
* `evaluateAsBooleanAsync()` is a variant of {@link evaluateAsync()} which only supports boolean results. Useful
|
|
153
153
|
* if valid expression must return boolean values.
|
|
@@ -157,7 +157,7 @@ export declare function evaluateAsBoolean(expression: string | jsep.Expression,
|
|
|
157
157
|
* the expression.
|
|
158
158
|
* @returns The result of evaluating the expression
|
|
159
159
|
*/
|
|
160
|
-
export declare function evaluateAsBooleanAsync(expression: string | jsep.Expression, variables?: VariablesMap): Promise<
|
|
160
|
+
export declare function evaluateAsBooleanAsync(expression: string | jsep.Expression, variables?: VariablesMap): Promise<boolean>;
|
|
161
161
|
/**
|
|
162
162
|
* `evaluateAsNumber()` is a variant of {@link evaluate()} which only supports number results. Useful
|
|
163
163
|
* if valid expression must return numeric values.
|
package/package.json
CHANGED
package/src/evaluator.ts
CHANGED
|
@@ -24,6 +24,7 @@ export { jsep };
|
|
|
24
24
|
|
|
25
25
|
/** An object containing the variable to use when evaluating this expression */
|
|
26
26
|
export type VariablesMap = {
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
27
28
|
[key: string]: string | number | boolean | Function | RegExp | object | null | VariablesMap | Array<VariablesMap>;
|
|
28
29
|
};
|
|
29
30
|
|
|
@@ -336,7 +337,7 @@ function defaultTypePredicate(result: unknown): result is DefaultEvaluateReturnT
|
|
|
336
337
|
);
|
|
337
338
|
}
|
|
338
339
|
|
|
339
|
-
function booleanTypePredicate(result: unknown): result is
|
|
340
|
+
function booleanTypePredicate(result: unknown): result is boolean {
|
|
340
341
|
return typeof result === 'boolean';
|
|
341
342
|
}
|
|
342
343
|
|