check
check(
parsed,options?):object
Defined in: packages/aip/src/filtering/checker.ts:728
Type check a parsed AIP-160 filter expression. Returns the checked expression along with any type errors encountered. The checked expression will include a type map and reference map that you can use for evaluation.
Parameters
Section titled “Parameters”parsed
Section titled “parsed”ParsedExpr
options?
Section titled “options?”Returns
Section titled “Returns”object
checkedExpr
Section titled “checkedExpr”checkedExpr:
CheckedExpr
errors
Section titled “errors”errors:
TypeCheckError[]
Example
Section titled “Example”const { checkedExpr, errors } = check(parsed, { decls: [ident("title", STRING)], registry: createRegistry(TimestampSchema), source: filterString,});