Skip to content

isHiddenDocument

isHiddenDocument<T>(value): value is HiddenDocument<string>

Defined in: packages/core/src/db/isHiddenDocument.ts:15

True when a populated field’s value is a populateDocs-produced HiddenDocument placeholder rather than a real target doc.

Generic over the real doc type T so the type predicate narrows a T | HiddenDocument union BOTH ways: the true branch narrows to HiddenDocument, the false branch narrows to T — no manual cast needed on either side, unlike an unknown-typed guard.

T

T | HiddenDocument<string>

The populated field’s resolved value to check.

value is HiddenDocument<string>

Whether value is a HiddenDocument.