Maintain types for memoized functions
This commit is contained in:
1 parent
faa12537e4
commit
63876025d2
6 files changed
+10
-9
No files matched your search
@@ -6,7 +6,7 @@ import * as expression from "../../lib/common/expression";
|
||||
import memoize from "../../lib/common/memoize";
|
||||
import timeAgo from "../timeago";
|
||||
|
||||
const evaluateParam = memoize((exp, obj, now) => {
|
||||
const evaluateParam = memoize((exp, obj, now: number) => {
|
||||
let timestamp = now;
|
||||
const params = new Set();
|
||||
const value = expression.evaluate(exp, obj, now, e => {
|
||||
|
||||
@@ -27,7 +27,7 @@ function putActionHandler(prefix: string[], dataYaml: string): Promise<any> {
|
||||
}
|
||||
|
||||
// Try parse to ensure valid expressions
|
||||
for (const v of Object.values(updated)) parse(v);
|
||||
for (const v of Object.values(updated)) parse(v as string);
|
||||
|
||||
store
|
||||
.queryConfig(`${prefix.join(".")}.%`)
|
||||
|
||||
Reference in new issue
Block a user