Hi - I have been using this in production for a few months now, and haven’t experienced significant issues with debugging or troubleshooting.
It also helps that the library is type-safe - if we are overriding a function, we must comply with the signature of the original function for TS to pass.
Wrt. run time errors, the use of proxy does not interfere with good stack traces, if that is what you are worried about.
If we take the example in this gist where an overriden function throws an exception, we can see that the stack trace clearly shows the file (which overrides the hello function) where the exception is originating from.
In effect, the DX is not much different if you use any other mechanism for making some feature runtime configurable. In comparision to most traditional IoC/DI utilities I find the DX to actually be superior:
@Inject/@Provide
boilerplate. This is great if you are writing a library or a small utility and don’t want to enforce usage of a specific DI/IoC library for your consumers.What we don’t have (and likely will never) is support for things like request scoped DI or hierarchy of IoC containers. In mostly-functional TS code I have seldom missed those patterns.
Yes, that mode works pretty well. In my case I don’t really own the types (they come from a third party source) so being able to to auto generate validators from them is very convenient.
I use it in the code generator mode (https://typia.io/docs/setup/#generation) that doesn’t require the tsc plugin integration and works well with other build tools (in my case esbuild) and arbitrary testing/code-coverage libraries.
I like jooq, but after using it in a few projects, I now personally feel an Entity centric approach where you control domain objects rather than have them generated fits in better in the java/kotlin ecosystem where sooner or later you’ll also need to add other annotations to the entities for jackson/spqr/microprofile-graphql etc.
Doing this with jooq is possible (given support for custom projections etc.) but it requires significantly more boilerplate as jooq is first and foremost a db-first library.
Having first class support for association loading etc. is also quite helpful esp. for crud-heavy applications as opposed to the jooq approach of staying closer to sql without abstractions. ymmv of course.
Lounge looks pretty cool
Build times in nodejs are not so great in even medium size projects if you make heavy usage of advanced typescript features - either yourself or through libraries like zod. So if something makes the nodejs runtime faster, it could potentially make ts compiler faster too - for which I’d be very grateful.
In my current setup I use pgtyped and ts-sql-query together in production. I think this is a stellar combination. I have previously used zapatos but moved away in favor of current combination. I’ll share my motivations below.
Composition of tagged templates (as slonic/zapatos/squid etc. encourage) gets messy very quick esp. as queries become more dynamic. ts-sql-query is amazing for complex dynamic queries - it has great support for things like subselects, upserts, CTEs, complex projections across a breadth of mainstream databases. It especially shines for complex conditional filters where a lot of js orms fall short. Of course it also works very well for general CRUD operations.
With libraries like zapatos single table crud operations are type-safe but for anything involving multi-table joins the library is not able to help much around type-safety and you need to provide result types yourself. If tomorrow after some schema refactoring the type of result changes, you will get a runtime exception. In case of ts-sql-query, complex multiple table operations are also type-safe and even when you perform joins on multiple tables, select some subset of columns etc. in most cases it is able to infer types. There is also a tool ts-sql-codegen (which I maintain) which is able to codegen the types from database so for common use cases the problem of keeping db schema and typescript types in sync is auto-solved for you.
Similarl pgtyped is great when you have some queries which are not very dynamic but lean heavily on postgres specific features, or custom extensions etc. For us these are mostly reporting, analytics queries, full text search queries etc. For these cases it is convenient to interactively try out sql in a notebook, arrive at the right query and then just dump it in a sql file after making it parameterized - this eliminates the need for a manual translation from SQL to typescript API. The pgtyped type generator ensures that the generated typescript API is reasonably well typed.
pgtyped approach becomes unwieldy if you need very dynamic query patterns unless you also lean heavily on stored procedures and pushing more logic into the database. This is something we avoid because frankly we find writing typescript much more enjoyable than pl/pgSQL. Also our services are read-heavy and being able to keep logic on ts side enables us to utilize granular caching better.
Tyson is nice - esp. if you are already using TS/JS.
Vim has a rich ecosystem of plugins like easymotion which allow you to jump directly to different parts of the current file with minimal keystrokes. There are vscode extensions like Jumpy and Acejump which provide a similar keyboard-driven cursor jumping support for vscode.
I highly recommend trying out one of these if you haven’t already. Once you get habituated to easymotion, you wonder how you survived without this so long.
I like it. The docs are a bit scattered and I haven’t switched to it completely, but it has proven to be very handy for some scenarios where I scrape some content from external sources and pull them into a local sqlite as a long term structured archive.
I don’t use it right now, but two years ago I helped a team incrementally adopt Kotlin in a ten year old java/spring/mybatis codebase. We didn’t have any android experience and in the initial few months mostly used kotlin as a better java, avoiding features that would prevent us from switching back to java if needed.
But it worked pretty well - we didn’t face much resistence from people experienced with java because they could still continue to benefit from their jvm familiarity, and the language was approachable to new folks who joined us. It also helped that we could just copy paste java code into a .kt file and intellij would convert it to kotlin.
We didn’t venture into kotlin’s js/native targets but for jvm it worked out great for us.
I also have been using httpie for a few years - it is really great.
Recently I have started using nushell which has a similar module builtin: https://www.nushell.sh/commands/docs/http_get.html Combined with rest of the nicities in nushell its a pretty good cli experience.
A big caveat looks to be that paid plan pricing is not disclosed. So likely geared towards enterprise customers.