FluffySpoon.JavaScript.CSharpToTypeScriptGenerator icon indicating copy to clipboard operation
FluffySpoon.JavaScript.CSharpToTypeScriptGenerator copied to clipboard

Multiple interface inheritance

Open fau-xx opened this issue 7 years ago • 1 comments

The generator is confused if an interface itself implements multiple interfaces like in the code below

public interface IArchiveEntry : IId, IOwned
{
    ArchiveEntryType Type { get; }
    List<IArchiveEntry> SubEntries { get; set; }

    DateTime CreatedOn { get; }
    string Name { get; }
}

generates invalid typescript with multiple extends:

interface IArchiveEntry extends IId extends IOwned {
     readonly type: ArchiveEntryType;
     subEntries: Array<IArchiveEntry>;
     readonly createdOn: string;
     readonly name: string;
}

fau-xx avatar Sep 27 '18 12:09 fau-xx

Can you make a PR? I think the parser needs to be able to support multiple interfaces.

ffMathy avatar Sep 27 '18 12:09 ffMathy