IFClite TypeScript API
    Preparing search index...

    Type Alias EntityRefCheck

    EntityRefCheck: (ref: EntityRef) => string | null

    Checks BOTH halves of a reference, not just the express id, and says which one is wrong: null when the backend can write to it, otherwise the reason, phrased as the clause a write method puts after its own name.

    A reason rather than a boolean because the two failures are different problems and a single message misdescribes one of them: an unknown model id does not mean the entity is missing (it usually exists, in the model the caller meant), and telling them it is missing sends them hunting for the wrong thing. createEffectiveEntityCheck builds the one both headless backends use.

    Type Declaration