/** * .what = detect whether an error is a SimpleCacheConditionError, across package boundaries * .why = * - a conditional cache backend lives in a *separate* package; the SimpleCacheConditionError * it throws is a *different constructor* from ours, so `instanceof SimpleCacheConditionError` * is false across the boundary — the wrapper then re-throws instead of converge * - `constructor.name` is the runtime class name, a realm-global string that matches regardless * of which package minted the class (unlike prototype identity, which `instanceof` checks) * - the ConstraintError-ancestry guard narrows the blast radius: an unrelated Error that merely * reuses the leaf name is NOT swallowed as a condition conflict (avoids a failhide-by-effect on * the `exception: ignore` path). it is checked by *name*, not instanceof, so it too survives a * duplicate helpful-errors copy * - exported publicly so a caller who uses `exception: 'throw'` can recognize a re-thrown conflict * the same cross-package-safe way the wrapper does — their own `instanceof SimpleCacheConditionError` * hits the exact boundary bug this predicate exists to overcome * - two deliberate tradeoffs, both a consequence of the same "structural check trades recall for * cross-package correctness" choice (detailed in .note, each locked by a test): * (1) it does NOT match *subclasses* of SimpleCacheConditionError (a subclass has a different * `constructor.name`) — a behavior narrowed vs the old `instanceof` * (2) it does NOT survive class-name mangle (a bundler that renames classes) — a false-negative * under aggressive minification * .note = * - structural discriminator by design; mirrors the structural capability detection in * HasCacheConditionals (see SimpleCache.ts). the SimpleCache contract prescribes that a * conditional backend throws a SimpleCacheConditionError, so the names are contract vocabulary, * not a coincidence * - narrowed vs the old instanceof: the leaf-name check does not match *subclasses* of * SimpleCacheConditionError (a subclass has a different `constructor.name`). no evidence any * backend subclasses it; locked by test so the boundary is explicit, not silent * - interim form: name-based. once helpful-errors ships a registered-symbol brand and it is pinned * via peerDependency, this predicate can also assert the helpful-errors family (single source of * truth, so both guards upgrade together) * - tradeoff, accepted deliberately: `constructor.name` does not survive class-name mangle (e.g. * terser with keep_classnames disabled). that is out of scope here — this is a server-side node * cache library, shipped unminified into node_modules, where class names are preserved. the * registered-symbol brand above is the mitigation path for any consumer that does bundle-and-mangle; * until then, name-based is the correct interim per the wish. locked by test ([case7]) */ export declare const isSimpleCacheConditionError: (error: unknown) => boolean;