Is it possible to use a @typeparam as Component?More explicitly, do something like the following MyComponent.razor:
@typeparam TComponent<TComponent />Of course, there would also be a MyComponent.razor.cs file whose content would be:
public partial MyComponent<TComponent> : ComponentBase where TComponent : ComponentBaseso that the compiler would know that <TComponent /> is meaningful.
I cannot find any documentation about this in Microsoft docs.
When I try it seems to compile, but display the following warning:
warning RZ10012: Found markup element with unexpected name 'TComponent'. If this is intended to be a component, add a @using directive for its namespaceHowever it is only a warning and not an error. It does't show anything in the browser though.
I am using ASP.NET 5.
Thanks