Duolith docs

Errors while checking a page

E0179 Behaviour input not written in the call

Message name's input is read once here; a behaviour's input is one object written in the call

Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.

Why

A behaviour takes one input, an object written in the call: the build turns each of its values into a read that happens where the behaviour uses it, so calendar({ min: booking ? booking.from : today }) follows booking and today (decision 0152). An input passed as a variable (calendar(options)), spread into the object ({ ...options }), or given with more arguments than the one input, is read once, when the call runs, and the behaviour would never see it change.

How to fix it

Write each value in the call, such as calendar({ start: options.start, min }), or take a function the behaviour calls when it wants the value (source: () => Post[]).

In a terminal

duolith explain E0179

Mentioned in