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
The following C# code:
[TsClass(AutoExportProperties = true)] public class MyBase { public bool BaseProperty1 { get; set; }; public bool BaseProperty2 { get; set; }; } [TsInterface(FlattenHierarchy = true, AutoExportProperties = true)] public class MyDescendant : MyBase { public bool DescendantProperty1 { get; set; }; public bool DescendantProperty2 { get; set; }; }
Will have the following TypeScript code generated:
interface MyBase { BaseProperty1: boolean; BaseProperty2: boolean; } /** * @todo Automatically implemented from MyBase */ class MyDescendant { BaseProperty1: boolean; // [X] Base properties are duplicated BaseProperty1: boolean; BaseProperty2: boolean; BaseProperty2: boolean; DescendantProperty1: boolean; DescendantProperty2: boolean; }
So there is a descendant C# class (TS class), and its base C# class (TS interface), and the base's properties get duplicated while code generation.
In case MyBase is Substituted instead of annotated with [TsClass], the above one works perfectly.
Substitute
[TsClass]
The text was updated successfully, but these errors were encountered:
Nice catch! Will try to create unit test
Sorry, something went wrong.
No branches or pull requests
The following C# code:
Will have the following TypeScript code generated:
So there is a descendant C# class (TS class), and its base C# class (TS interface), and the base's properties get duplicated while code generation.
In case MyBase is
Substitute
d instead of annotated with[TsClass]
, the above one works perfectly.The text was updated successfully, but these errors were encountered: