-
Hello there, Is there any reason to have an I'm surprised there's no mention about this in the documentation, as I'm not the first one to wonder. Thanks for your insights. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
General Kenobi 🤖 There are only two behaviors when setting a value to a differently-typed property: either it crashes, or the value is silently converted to the property type ( That means the only case where the property is assigned, you’re guaranteed its value has the correct type. As such, the |
Beta Was this translation helpful? Give feedback.
General Kenobi 🤖
There are only two behaviors when setting a value to a differently-typed property: either it crashes, or the value is silently converted to the property type (
false
being converted to an empty string e.g.).That means the only case where the property is assigned, you’re guaranteed its value has the correct type. As such, the
Type
constraint won’t serve any purpose.