When parsing a ts file containing classes, the type of jsonStructure.classes[0].extends[0] is TypeModel:
https://github.com/SoftMediaLab/ts-structure-parser/blob/master/index.ts#L145
But on the generated JSON I see it's in a fact a BasicType, which has the fields I need, so I am forced to do a casting. That would not be necessary if TypeModel were converted to a discriminated union type.
When parsing a ts file containing classes, the type of
jsonStructure.classes[0].extends[0]isTypeModel:https://github.com/SoftMediaLab/ts-structure-parser/blob/master/index.ts#L145
But on the generated JSON I see it's in a fact a
BasicType, which has the fields I need, so I am forced to do a casting. That would not be necessary ifTypeModelwere converted to a discriminated union type.