common-workflow-language / common-workflow-language/schema_salad

[TypeScript Codegen] Remove undefined type from optional types

Ouverte
#488 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
86
Forks
64
Merge moyen
19 h 24 min
PR mergées (30 j)
19

Description

Currently, types marked as optional (using the `?:` notation) still contain the undefined type. This does not cause any issues but is also redundant.

To fix this, the `type_loader` [function](https://github.com/ZimmerA/schema_salad/blob/3ee2ceb51fc8ddbd1aa791d4f0c6d7465acbe200/schema_salad/typescript_codegen.py#L379) has to be modified in a way that the `undefined` type is not added to the `instance_type` field while still retaining information about the type being optional so that functions like `declare_field` can add the `?:` notation.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.