Skip to content

Commit d15eeaf

Browse files
committed
refactor(almanac.ts): use typesation of selectn
1 parent b243f27 commit d15eeaf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/almanac.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ export default class Almanac {
8383
if (path) {
8484
return factValuePromise.then(factValue => {
8585
if (factValue && isObjectLike(factValue)) {
86-
let pathValue = (selectn(path) as Function)(factValue)
86+
let pathValue = selectn<Function>(path)!(factValue)
8787
debug(
88-
`condition::evaluate extracting object property ${path}, received: ${pathValue}`,
89-
)
88+
`condition::evaluate extracting object property ${path}, received: ${pathValue}`,
89+
)
9090
return pathValue
9191
} else {
9292
warn(
93-
`condition::evaluate could not compute object path(${path}) of non-object: ${factValue} <${typeof factValue}>; continuing with ${factValue}`,
94-
)
93+
`condition::evaluate could not compute object path(${path}) of non-object: ${factValue} <${typeof factValue}>; continuing with ${factValue}`,
94+
)
9595
return factValue
9696
}
9797
})

0 commit comments

Comments
 (0)