Types & data

Building values

You build a value by naming its type: TypeName{ field: value, ... }. There are no anonymous object literals — a value always comes from a declared type, so a typo can’t quietly invent a new shape. It gets caught:

aeg isn’t a field of User, so Ascent stops you (and points out that age is now missing, too). Fix the field name and it builds cleanly. Misspell the type instead — Userr{ ... } — and you get the same treatment: “I can’t find a type named Userr.”

Notice the separator is : here — name: "Ann" — because you’re building a value. A different one turns up when you update one, two screens along.