Runtime Type Information
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, python
- Domain
- compilers
Research direction
The issue does not name any files, tests, or compiler entry points. Start by tracing how Python typing annotations are handled during transpilation and how generated JavaScript represents classes and properties. Done would require an agreed design and a verified way for generated JavaScript to access the requested type metadata.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 218
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TranscryptOrg/Transcrypt
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
TranscryptOrg/Transcrypt#913 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
TranscryptOrg/Transcrypt#911 · 2 comments ·
-
IS: bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
TranscryptOrg/Transcrypt#908 ·
-
SUB: documentation
Difficulty 1/5 Under an hour Newbie friendliness 62/100
TranscryptOrg/Transcrypt#656 · 7 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
TranscryptOrg/Transcrypt#914 ·
All issues in TranscryptOrg/Transcrypt
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100