Skip to content

cupertino-files / PREDICATE_TYPE_FUNCTIONS

Variable: PREDICATE_TYPE_FUNCTIONS

const PREDICATE_TYPE_FUNCTIONS: ReadonlyMap<number, string>

Defined in: src/tst/predicates.ts:165

predicate_type values whose formula is a function call, not a comparison.

Numbers' non-comparison conditions — "is blank", "text contains", and the rest — compile to a function rather than an operator, so they have no entry in PREDICATE_TYPE_OPERATORS. Recording the codes anyway means a reader can say which condition it is looking at, and it keeps them from being mistaken for gaps in the comparison enum.

Type 3 is "text contains" in both rule systems: it compiles to NOT(ISERROR(f(needle, cell))), where f is function index 296 — SEARCH-shaped in its arguments, but not SEARCH, which is 131. That index is in no harvested name table, so the formula renders it FUNCTION_296 and this map records no entry for 3: an entry's value is the identifying callee's name, and 296 does not have one yet.

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.