You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional attributes were implemented in #1537, but they require the use of a special syntax ?=. This was somewhat required for the first implementation because of the internal handling of attributes but the very same PR also changed that so it's no longer a requirement.
Tag attributes which support the optional attribute syntax should instead accept values that implement Into<Option<_>>.
Optional component properties (i.e. props marked with #[prop_or*], not necessarily with value Option<_>) should also accept Into<Option<_>>. If the variant is None, the default value should remain. Hopefully this doesn't cause any type inference problems for the Transformer...
The documentation needs to be updated in a few places.
The text was updated successfully, but these errors were encountered:
Optional attributes were implemented in #1537, but they require the use of a special syntax
?=
. This was somewhat required for the first implementation because of the internal handling of attributes but the very same PR also changed that so it's no longer a requirement.Initial discussion: #1537 (comment).
Required changes
Into<Option<_>>
.#[prop_or*]
, not necessarily with valueOption<_>
) should also acceptInto<Option<_>>
. If the variant isNone
, the default value should remain. Hopefully this doesn't cause any type inference problems for theTransformer
...The text was updated successfully, but these errors were encountered: