A ListBuilder with the items method removed at the type level.
Returned by ListBuilder.singletons(): calling .items() afterwards would
replace the whole items array and silently discard the singleton items, so
the type prevents it. Call .items() before .singletons(), or use
S.listItem().singleton() inside a regular .items() array, when mixing
singletons with other items.
The runtime object is a plain ListBuilder; only the declared type
narrows. Chainable methods keep returning SingletonListBuilder so the
omission cannot be undone by further chaining.
A
ListBuilderwith theitemsmethod removed at the type level.Returned by
ListBuilder.singletons(): calling.items()afterwards would replace the whole items array and silently discard the singleton items, so the type prevents it. Call.items()before.singletons(), or useS.listItem().singleton()inside a regular.items()array, when mixing singletons with other items.The runtime object is a plain ListBuilder; only the declared type narrows. Chainable methods keep returning
SingletonListBuilderso the omission cannot be undone by further chaining.