We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We are designing some custom extensions for our project, and one them relies on the generic parameter default type feature of Typescript. For example:
interface Test<T = string> {}
The current API of typescript-generator regarding generics is the following:
typescript-generator
public static class GenericVariableType extends BasicType { public GenericVariableType(String name) { super(name); } }
As you can see it is not possible to provide a default type, therefore we would like to request this functionality in the API.
Luckily the following workaround works (although it looks dirty):
new TsType.GenericVariableType("T = string")
The text was updated successfully, but these errors were encountered:
I think a similar comment can be made about type bounds, I am not sure if these are supported either.
Sorry, something went wrong.
I did PR to support bounds but it wasn't accepted.
No branches or pull requests
We are designing some custom extensions for our project, and one them relies on the generic parameter default type feature of Typescript. For example:
The current API of
typescript-generator
regarding generics is the following:As you can see it is not possible to provide a default type, therefore we would like to request this functionality in the API.
Luckily the following workaround works (although it looks dirty):
The text was updated successfully, but these errors were encountered: