Runtime type generation: Proof of Concept #658
lorenzholzbauer
started this conversation in
Ideas
Replies: 1 comment
-
It would potentially be even more efficient to simply let the compiler directly assign and access the properties it needs. So that the following code: interface X {
x: num;
}
...
if ({} matches X) {
...
} Is translated as: ...
const __intf_X = new Type("X", [{ x: __kipper.num }], []);
...
if (__intf_X.matches({})) {
...
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At runtime a type can be represented using the follwing construct:
The fields and methods can be undefined in primitive types.
The types are saved in an array to check nested types.
Beta Was this translation helpful? Give feedback.
All reactions