I don't see a way to embed type information in the transpiled JS code that can be accessed at runtime. Currently I have entities defined in Python and am converting those to JS so I can use them as view models on the front-end. Everything is working great, except that I define the entity field types using the Python typing module and this type information is lost after transpiling. Note, I'm not looking for runtime type enforcement like is currently supported with mypy... I'm looking to use reflection in the javascript to understand what types my entity properties are.
First, is this doable and I'm just missing it?
Secondly, if not, then has any thought been put into this? The type information for class properties could be stored in some type of metadata field on the class itself. And, maybe something similar could be done for module-level variables and function parameters?
Love this tool, btw, so thanks for the work you've put into it.
I don't see a way to embed type information in the transpiled JS code that can be accessed at runtime. Currently I have entities defined in Python and am converting those to JS so I can use them as view models on the front-end. Everything is working great, except that I define the entity field types using the Python typing module and this type information is lost after transpiling. Note, I'm not looking for runtime type enforcement like is currently supported with mypy... I'm looking to use reflection in the javascript to understand what types my entity properties are.
First, is this doable and I'm just missing it?
Secondly, if not, then has any thought been put into this? The type information for class properties could be stored in some type of metadata field on the class itself. And, maybe something similar could be done for module-level variables and function parameters?
Love this tool, btw, so thanks for the work you've put into it.