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
The rawValue implementation is call description method
case .constant(let value):return"\(value)"
default: return""}
So if a TemplateValue's Value is an Optional type, it's result will surprisingly be "Optional(xx)"
A example is the following
id is UUID? type and a property in Post model
post is TemplateValue<Post> here
A { "Hello" }.id(post.id.rawValue)
This will give me "Optional(xx)" or "nil".
But what I want is "xx" or "".
However I can't do it, since I can not get a Post type or UUID? here.
All I can get is TemplateValue<Post> and TemplateValue<UUID?> and then call the rawValue method.
The text was updated successfully, but these errors were encountered:
The rawValue implementation is call description method
So if a TemplateValue's Value is an Optional type, it's result will surprisingly be "Optional(xx)"
A example is the following
This will give me "Optional(xx)" or "nil".
But what I want is "xx" or "".
However I can't do it, since I can not get a
Post
type orUUID?
here.All I can get is
TemplateValue<Post>
andTemplateValue<UUID?>
and then call the rawValue method.The text was updated successfully, but these errors were encountered: