Skip to content

Accessing the type repository #403

Answered by marcj
ZPiDER666 asked this question in Q&A
Discussion options

You must be logged in to vote

Deepkit runtime types are based on explicit types only. This is a design decision so that not too much runtime type-related code is generated or too much overhead is generated. So, in runtime there is no information about types of rawData or cls available.

I had to reread your questions multiple times to understand the use-case (what confused me was cls), but I think I understand now. Let me write it down first and let me know If I'm right: You have various classes like Dog in your application and you have no direct access to them (you can not import { Dog } from 'xy' them, because maybe import path is unknown). Yet, you have a unique identifier to this class (here Dog) and a version, and…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ZPiDER666
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants