Skip to content

Commit

Permalink
refactor(almanac.ts): use typesation of selectn
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdevtom committed May 10, 2018
1 parent b243f27 commit d15eeaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/almanac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ export default class Almanac {
if (path) {
return factValuePromise.then(factValue => {
if (factValue && isObjectLike(factValue)) {
let pathValue = (selectn(path) as Function)(factValue)
let pathValue = selectn<Function>(path)!(factValue)
debug(
`condition::evaluate extracting object property ${path}, received: ${pathValue}`,
)
`condition::evaluate extracting object property ${path}, received: ${pathValue}`,
)
return pathValue
} else {
warn(
`condition::evaluate could not compute object path(${path}) of non-object: ${factValue} <${typeof factValue}>; continuing with ${factValue}`,
)
`condition::evaluate could not compute object path(${path}) of non-object: ${factValue} <${typeof factValue}>; continuing with ${factValue}`,
)
return factValue
}
})
Expand Down

0 comments on commit d15eeaf

Please sign in to comment.