implementstion Flexibility, Compiler optimizations, eslint / webpsck / vscode plugins, and more ?! #3109
bradennapier
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@KATT Monorepos ofc agree, that is not always a reality for some. Which makes tRPC a no-brainer for new projects, but to allow adapting to a wider community for those of us where architectures don't support monorepos yet ;-).
This could be implemented with a compiler transformer. Some things to solve ofc... but It is worth pointing out because I have actually built one for zod a couple years ago 🥇 . It was just a Proof of Concept for the zod community, but It would essentially transform a zod input validator into typescript types which could be easily communicated across repo-lines I would imagine.
I can only imagine what capabilities a ts compiler plugin could do for tRPC where essentially every part of the request would be exposed to transform however needed.
trpc
dependency override similar to howSequelize
andsequelize-typescript
currently require you to define manually - but could be automatically built and updated by expanding the right typescriptinterface
.ttypescript
--Shown is
Type
toZod
but it also did the opposite if I remember (or it'd be easy enough to do if i hadn't implemented that yet lol)@dohaicuong this would actually probably be similar to how Rust is doing it, as I am sure that does some sort of compiler extension to generate rust code from the AST.
Beta Was this translation helpful? Give feedback.
All reactions