You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated types ain't good because "type1" in the "oneOf" type is not considered to be the same that the "type1" value in the enum leading to bad types (possibly due to type branding).
It produces this atm:
declaretypeReusedEnumTest={}&({type: Enums.Type;}&({type: "type1";type1SpecificProp?: string;}|{type: "type2";type2SpecificProp?: string;}));declarenamespaceEnums{exportenumType{Type1="type1",Type2="type2"}}constx: ReusedEnumTest={type: Enums.Type.Type1,// Type 'Enums.Type' is not assignable to type 'never'type1SpecificProp: 'xxxx',};
When having that kind of schema:
The generated types ain't good because "type1" in the "oneOf" type is not considered to be the same that the "type1" value in the enum leading to bad types (possibly due to type branding).
It produces this atm:
And should produce this instead:
The current workaround is to remove the common type property but at the price of having no enum to refer to 🤷.
The text was updated successfully, but these errors were encountered: