/** * FHIRPath collection-unsafe type-operator rewrite * ------------------------------------------------- * * fhirpath.js (with a FHIR model loaded) throws * "Expected singleton on left side of 'as'" / "...of 'is'" * whenever the `as` / `is` type operators are applied to a collection — e.g. * `component.value as Quantity`, where `component` repeats. The throw lands in * the constraint executor's catch block, so the constraint is silently skipped * (reported only as an informational evaluation-error). This is gap P-4: * `as`/`is` on non-singleton collections. * * Both operators have collection-safe equivalents that are identical for the * singleton case the operators were designed for: * * - `X as T` → `X.ofType(T)` — filter to items of the type. For a * singleton this returns the item if it matches (else empty), exactly like * `as`. * - `X is T` → `X.all($this is T)` — true iff every item is of the type. * For a singleton (and for empty) this is exactly `X is T`; for a collection * it is a sensible total semantics instead of a throw. * * `.type()` is left alone — it already works on collections. */ export declare function rewriteCollectionTypeOperators(expression: string): string; //# sourceMappingURL=fhirpath-as-operator-rewrite.d.ts.map