Replies: 1 comment 3 replies
-
How would quickjs see those type hints? It operates on JS, not TS. If you mean magic comments, that's basically what this stage 1 type annotations proposal proposes, but they're useless to a JS engine because at runtime they're descriptive, not prescriptive. A function that says it adds two numbers must still be able to handle strings as inputs. (Also, I don't think that proposal is going anywhere. It's been sitting at stage 1 for years.) The stage 2 structs proposal is more likely to go places and yield real improvements. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would it be possible to achieve an efficient AOT compiler with type hints from typescript?
Beta Was this translation helpful? Give feedback.
All reactions