Closed jessitron closed 4 years ago
@jessitron I see that the signature is now evaluateExpression(pex: string | PathExpression): ExecutionResult;
ExecutionResult
also comes with the companion methods from the tree-path
module
export declare function isSuccessResult(a: any): a is SuccessResult;
export declare function isFailureResult(a: any): a is FailureResult;
Is the current implementation acceptable?
Yes, it seems like this is no longer relevant.
here: https://github.com/atomist/automation-client-ts/blob/4e7a76592bb5a55d4c87fe74a9f3a292d3551bfa/src/tree/ast/FileHits.ts#L46
this returns any, which is sad. It actually returns an array of match results which is empty for no matches
We wanted to write
evaluateExpression(findExportKeyword) ? "public" : "private"
so we would like evaluateAny to return
MatchResult[] | null
and be falsey without matches.