concrete/contract/fill-verb
A fill names its verb and brief, a pick names its candidates with of and no other verb takes one, and a filled list declares max.
A fill names its verb and brief, a pick names its candidates with of and no other verb takes one, and a filled list declares max.
Graded by the contracts stage of concrete check, in the contract venue. A violation reports this id and the file it failed at — see every rule and concrete check.
Reason
A fill says what the model does: fill.write writes values, fill.pick picks from
candidates, fill.find finds places and addresses. Its brief is the whole instruction.
The slot a fill sits in declares its output, and the fill declares its input. A write
has no candidates: the kind it writes is its holder's — a text slot's own, or a written
list's item. A pick chooses from its holder's candidates, wherever it sits: a select's
choices, a media slot's assets of its kind in the list its from names, a row's table, or
those of a picked list's item's one candidate-holding field. The published fill spec
carries those candidates as every pick's of option, derived from the holder, so they
are stated once; a media slot with no from owns its asset, so a pick on one names
no candidates. A find names none: the platform's lookup
supplies what it yields. It fills only a poi or an address, or a list whose item
is one, and nothing else fills those: a write or a pick on one is refused.
A fill is an open supply, so a list it sources declares max, and no verb takes a
count — the list's own min and max bound how many items it fills. A fill is the
list's source, so the list declares no other. A pick never repeats an element
unless its unique option is false. An object holds no value of its own and is never
filled; its fields are.
Type-caught: the verbs take only their own keys, no verb takes an of option, and a
written list owes its item and a filled list its max, by type. Check-caught for a
fill spec assembled outside the builders — a pick missing its of option, or a write or
a find carrying one — which publishing re-runs the contract venue over.
Fix
Name the verb and brief, give every pick's holder its candidates — a select's, a row's or a media slot's from — state a written list's
kind in item, and bound the filled list with max.
Before and after
// A written list with no `max` and no `item`: the list's types refuse it, as the rule does.
// @noErrors
import { fact, fill, list } from "@homepages/concrete";
list({
label: "Features",
source: fill.write({ reads: [fact.property.description], brief: "What sells this home." }),
});import { fact, fill, list, text } from "@homepages/concrete";
list({
label: "Features",
max: 8,
source: fill.write({ reads: [fact.property.description], brief: "What sells this home." }),
item: text.short({ cap: 40 }),
});