Type signature update for objects (unreleased)
Changing how objects are compared to the editor. A type-level only change.
Explanation
Before the release of the builtin metadata "default", no props were nullable. After the update, all objects are nullable by default. This marks the reverting change back to non-nullable for objects. Objects can be nullable by using HasFallback
or passing default: true
to defineProp
.
Status
Unreleased to NPM
Code Example
const Person = defineProp({ age: 0 })
const OptionalPerson = defineProp({ age: 0 }, { default: true })
Objects, or any type, can still be optional by passing default: true
. Objects are no longer optional automatically.