reinforced / Reinforced.Typings

Converts C# classes to TypeScript interfaces (and many more) within project build. 0-dependency, minimal, gluten-free
MIT License
507 stars 82 forks source link

Invalid code generated when C# code inherits from generic #248

Open nvirth opened 2 years ago

nvirth commented 2 years ago

Hi,

Using v1.6.1, this C# code:

namespace MyNamespace
{
    [TsInterface]
    public class MyGenericBase<TValue>
    {
    }

    [TsInterface]
    public class MyDescendant : MyGenericBase<int>
    {
    }
}

will result in this generated TypeScript code:

module MyNamespace {
    export interface IMyDescendant extends IMyGenericBase`1<number> // <-- Syntax error by `1
    {
    }
}