Type Alias: FieldLockRuleWrapper
FieldLockRuleWrapper = (
next) =>FieldLockRule
Defined in: model/field-lock.ts:48
How a plugin claims the seam, composing onto the current occupant the way ExtenderWrapper and
HierarchySourceWrapper do:
ctx.edits.setLockRule((next) => (entry, field) =>
field === 'cost' && entry.isDescendantOf(unlockedSubtreeRootId) ? 'anywhere' : next(entry, field));
That reads: open cost on every descendant of one subtree root, otherwise whatever the next
rule says. The root itself stays locked — isDescendantOf answers false for itself (#473).
A rule that narrows rather than opens calls next first: const answer = next(entry, field); return answer === 'anywhere' ? 'api' : answer; reads "the API may still write it, nobody else."