Skip to main content

Type Alias: PlaceRuleWrapper

PlaceRuleWrapper = (next) => PlaceRule

Defined in: model/place-rule.ts:51

How a plugin claims the seam, composing onto the current occupant the way FieldLockRuleWrapper does:

ctx.edits.setPlaceRule((next) => (place) =>
place.parent?.id === frozenParentId ? 'api' : next(place));

That reads: set the place rule — a place under the frozen parent opens to the API only, else ask the next rule. Answering 'api' on currentParent refuses giving up a child the same way answering it on parent refuses taking one in.

Parameters​

next​

PlaceRule

Returns​

PlaceRule