You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know the title is weird, but I don't know how to describe it better.
Here is a simple example:
This C# code:
public interface A { }
public interface B : A { }
public interface C : B { }
public interface D { }
public class MyClass : C, D { }
Will generate this TS:
export interface A { }
export interface B extends A { }
export interface C extends A, B { } // A is redundant
export interface D { }
export class MyClass implements A, B, C, D { } // A and B are redundant
So when you inherit an interface, it explicitly extends all the interfaces in the tree, instead only the directly extended ones.
Similar when a class implements an interface, it explicitly implements the whole interface tree.
I know it's not a function issue, but it's needless redundancy. I have long inheritance chains, and when I add something in the middle I need to update a whole bunch of classes. Does anyone have an idea how to get rid of the redundancy?
So just to be clear, the output I'm looking for is:
export interface A { }
export interface B extends A { }
export interface C extends B { }
export interface D { }
export class MyClass implements C, D { }
The text was updated successfully, but these errors were encountered:
I know the title is weird, but I don't know how to describe it better.
Here is a simple example:
This C# code:
Will generate this TS:
So when you inherit an interface, it explicitly extends all the interfaces in the tree, instead only the directly extended ones.
Similar when a class implements an interface, it explicitly implements the whole interface tree.
I know it's not a function issue, but it's needless redundancy. I have long inheritance chains, and when I add something in the middle I need to update a whole bunch of classes. Does anyone have an idea how to get rid of the redundancy?
So just to be clear, the output I'm looking for is:
The text was updated successfully, but these errors were encountered: