Open halsandr opened 1 year ago
I am finding that the [TsTypeUnions] attribute only works when it is in an interface that has [ExportTsInterface], if it is on a dependant type, then the union is ignored.
[TsTypeUnions]
[ExportTsInterface]
Controller.cs
[ExportTsInterface] public interface TestController { TestUnion ControllerProp { get; set; } } public interface TestUnion { [TsTypeUnions("number")] string TestUnionProp { get; set; } }
TestUnion.d.ts
export interface TestUnion { TestUnionProp: string; }
[ExportTsInterface] public interface TestUnion { [TsTypeUnions("number")] string TestUnionProp { get; set; } }
export interface TestUnion { TestUnionProp: string | number; }
I am finding that the
[TsTypeUnions]
attribute only works when it is in an interface that has[ExportTsInterface]
, if it is on a dependant type, then the union is ignored.Controller.cs
TestUnion.d.ts
Controller.cs
TestUnion.d.ts