I'm using TypeWriter to convert all my C# models into TypeScript interfaces. One of my models looks like this:
public class ListData<TOptions> where TOptions : ListOptions { ... }
In this context ListOptions is another model that will also be converted into a TypeScript interface. However, the generated TypeScript interface of my ListData model looks like this:
interface ListData<TOptions> { ... }
The generic type constraint is lost. I want to achieve the following:
I was hoping the TypeParameterCollection would contain information about the constraint, so I could achieve the above. However, I was not able to find any reference to generic type constraints. Are they not supported?
I'm using TypeWriter to convert all my C# models into TypeScript interfaces. One of my models looks like this:
In this context
ListOptions
is another model that will also be converted into a TypeScript interface. However, the generated TypeScript interface of myListData
model looks like this:The generic type constraint is lost. I want to achieve the following:
I was hoping the
TypeParameterCollection
would contain information about the constraint, so I could achieve the above. However, I was not able to find any reference to generic type constraints. Are they not supported?