Replies: 1 comment 1 reply
-
Related: #434 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently had a bug in my brain that led me to coming up with an imaginary CLJS syntax that compiled to TypeScript annotations. I wrote it down in a random gist here: https://gist.github.com/lilactown/e924ec5dfe801a596ffd02477ddfd55f
It takes advantage of metadata to annotate a form, similar to how type annotations are done in Clojure today, but extends it to allow passing arbitrary forms as the tag which then the compiler would parse produce the accompanying TypeScript output. If the Clojure(Script) compiler was extended to allow this too (as a no-op), the code would remain valid ClojureScript consumable by other tools as well.
As long as the reader supports this, I don't see any complications other than a small matter of programming to produce the correct TS output.
Beta Was this translation helpful? Give feedback.
All reactions