svenheden / csharp-models-to-typescript

C# models to TypeScript
88 stars 58 forks source link

Include IReadOnlyCollection and IReadOnlyDictionary #35

Closed sprengr closed 4 years ago

sprengr commented 4 years ago

This allows following conversions:

using System.Collections.Generic;

class Poco {
    public IReadOnlyCollection<int> Numbers { get; }
    public IReadOnlyDictionary<string, int> NumberPerKey { get; }
}

to

export interface Poco {
    Numbers: number[];
    NumbersPerKey: Record<string, number>;
}
svenheden commented 4 years ago

Thanks @sprengr!