This message was deleted.
# dotnet
s
This message was deleted.
t
If using the resource args as a property of component args works for your scenario, I think that’s a good option
g
Thanks @tall-librarian-49374- That would work for most scenarios. I guess the only downside of doing it this way (Correct me if i'm wrong?) is that if I want to override a value to be set as default, it cannot be hidden from the args so a consumer of the component might set it as one value but it will then get overriden. (Thinking of a security option that I would like to enforce on the resource)
t
Yes, indeed. You could prohibit those scenarios by runtime checks in constructors, but not at compile time.
TypeScript is actually quite powerful for such scenarios, where you can define types based on the shapes of other types and mix them together nicely. .NET is quite a bit more rigid, so you’d either have to duplicate, or allow inconsistencies mitigated at runtime.
👍 1
g
Thanks