Skip to content
New issue

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

How to exclude some interfaces from being inherited? #23

Open
Jonas-Marty opened this issue Jun 24, 2019 · 1 comment
Open

How to exclude some interfaces from being inherited? #23

Jonas-Marty opened this issue Jun 24, 2019 · 1 comment

Comments

@Jonas-Marty
Copy link

Let's say I have a class in csharp which implements IEquatable. Is there a way to exclude this interface from being inherited in typescript? This interface obviously does not exist in typescript an therefore generates an error.

public class DiffPiece : IEquatable<DiffPiece> 
{
    public ChangeType Type { get; set; }
    public int? Position { get; set; }
    public string Text { get; set; }
    public List<DiffPiece> SubPieces { get; set; } = new List<DiffPiece>();
}
export interface DiffPiece extends IEquatable<DiffPiece> {
    type: ChangeType;
    position?: number;
    text: string;
    subPieces: DiffPiece[];
}

Currently I'm helping myself by cleaning out the extends IEquatable<DiffPiece> after each generation, but this is not very convinient.
I may set up a pull request in the next days.

@Jonas-Marty Jonas-Marty changed the title How to How to exclude some interfaces from being inherited? Jun 24, 2019
@Jonas-Marty
Copy link
Author

I made a pull request for this feature 😃 #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant