3 ms·
It would be great to have some sort of sql string to type parsing as some sort of plugin to TypeScript.
by mewpmewp2 2y ago
It would be great to have some sort of sql string to type parsing as some sort of plugin to TypeScript.
- user432678 2y agoDidn’t use myself, but AFAIK slonik library is doing what you’ve described: https://github.com/gajus/slonik https://github.com/gajus/slonik
- mewpmewp2 2y agoIt doesn't seem to be doing what I meant. I mean typing compile time and most importantly while using the IDE. Without having to generate types manually or importing them from a generated file.
- user432678 2y agoI have probably misunderstood the documentation, the built-in sql tagged template function seems to be providing static type safety using conditional types magic. But, yeah, maybe I am too optimistic about this. Well, too bad then.