r/typescript • u/tofino_dreaming • May 19 '25
Introducing Zod 4
r/typescript • u/wobsoriano • Sep 26 '20
r/typescript • u/binarynate • Mar 30 '20
r/typescript • u/DanielRosenwasser • Feb 28 '25
r/typescript • u/pimterry • Nov 24 '20
r/typescript • u/HetRadicaleBoven • Aug 20 '20
r/typescript • u/DanielRosenwasser • Mar 06 '26
r/typescript • u/DanielRosenwasser • Oct 01 '22
r/typescript • u/Csjustin8032 • Jan 27 '26
My boss is very insistent that we move away from Typescript after having written over half of our codebase in it. We only have him and I that really write code in our codebase, and only I have code that interacts with our backend. Initially, he was more open to typescript, but now he is getting very anti-typescript.
His reasoning includes that Typescript "assumes knowns", that it makes a development environment too rigid and it should start from pure discovery, that there's "only benefits until it's presumptuous", that it makes engineers lazy, that if Typecript would find an error, it's up to you to just be a better engineer and find it on your own.
Would you be open to staying at the company? I worked here for over 5 years, and I'm starting to get burned out when my technical decisions continually are called into question. For reference, we use React and graphql. He's even gotten upset that our graphql schema has non-nullable types because "everything in the web starts as undefined", which is an argument I don't really understand. The most fustrating part is I've set up a type system that is super easy to understand and will spoonfeed you the correct data shapes for talking to the backend or communicating between components. I've tried to actually make it easier for him, but he just says "I've been in tech (business side) for 30 years. Don't you think I might know and be thinking about some things that you don't?" He gets into very esoteric discussions about "principals", but our work is already moving at a snails pace and he wants to remove something that really speeds up my development. His compromise is to write everything in plain JS and add typescript on each file after it's been testing and is working, but to me that seems like it completely defeats the point of Typescript. Thoughts?
r/typescript • u/Kethqwerty • Sep 15 '25
Sometimes it feels like 20–30% of my files are just type gymnastics, declaring, merging, extracting, all just to make the compiler happy and silence warnings.
God forbids I try to inspect a react type to figure out how to actually work with it, I’m dropped into puzzles like this:
type ComponentProps<T extends keyof React.JSX.IntrinsicElements | React.JSXElementConstructor<any>> = T extends React.JSXElementConstructor<infer Props> ? Props : T extends keyof React.JSX.IntrinsicElements ? React.JSX.IntrinsicElements[T] : {}I have to focus 100% to be able to understand what this type exactly expects. Nearly all my coding battles are against types not business logic.
r/typescript • u/pimterry • Dec 17 '20
r/typescript • u/DanielRosenwasser • Nov 05 '19
r/typescript • u/mikle74 • Jul 21 '22
r/typescript • u/mariuz • Nov 03 '22
r/typescript • u/[deleted] • Mar 03 '21
Hi,
I'd like to give lots of devs a headsup about how "great" typeorm is, because we've just did a big project and there were just too many issues that made me quite dislike TypeORM being in its currently under-developed state.
Some background info: we were using TypeORM + MySQL so I'll be judging it based on this stack.
TypeORM can be great for smaller projects, but we did a big project that contained lots of complex logic as well and thus having really advanced queries. TypeORM has too many bugs in order to maintain a big project. They're still fixing issues form many years ago and even though it's a popular project, it's not being maintained properly because responses from the maintainers are too slow and thus can't solve things quickly. I've also submitted some issues months ago that didn't had any replies yet.
I've spent days and days to figure out things because of lack of documentation and eventually got my answer through some older issues. Yikes!
We could do a lot but I've spent weekends with my colleague trying to figure out why a certain query didn't work or how TypeORM exactly did things under the hood, because the behavior was just weird. For example:
There are 2 ways of how you can apply a limit/offset in TypeORM: skip/take for entities and offset/limit if you want to limit the raw result coming from SQL before TypeORM is processing it. Basically, as soon as you start having any kind of JOIN in your query, use skip/take for pagination purpose. Was a bit hard to find out the exact meaning, even though a part of this was documented.
Adding a field into a response in a query even though it's not defined in the entity - This functionality is probably one the most ugliest things I've spent a day or 2 finding a proper temporarily solution for. If you have a Post entity and you want to query it and add another field, for example: likedByCurrentUser, then you must define this field in your entity, but adding { select: false } meaning that your database table has this field as a column and then in your query your alias must be post_likedByCurrentUser so that TypeORM knows through the post_ prefix that this is a field from the Post entity. Yes, you have to do it this ugly for because you only want 1 single query to have 1 more custom field in the response.
Can't do sub-queries properly - Right now if you want to use leftJoinAndMap but you want to limit this query result to X items, you can't do that. It's true that this is somewhat expected behavior for MySQL itself, but looking at PHP Laravel's query builder, they allow this perfectly.
Computed/virtual properties - Inside an entity you can do @AfterLoad() with a function to always do another query when you're fetching this entity. For example, when fetching a Post, you might want to do an @AfterLoad() where you add another field that contains the latest comment. But the problem is, it doesn't have any context of where this is being executed by the way TypeORM is designed, meaning that you are forced to always execute this on the entity, but there will be situations you only need an id field, but it will always execute the afterload functions, because you don't have context. In PHP Laravel's query builder you can modify the query and have context and thus decide when to execute the query inside the computed property. This is a big problem in TypeORM because these kind of queries is what made us run into performance issues. We would get like 20 items in less than a second, but each entity had 2 after loads and thus doing 2 extra queries for each item and this gave as an additional 6+ seconds in total runtime for everything to be done, which makes sense, but it's just poorly designed imo.
Had to use getRawAndEntities() too many times and manually merge raw fields into the entity results because there was just no other way that TypeORM could handle this, relative to PHP Laravel's query builder where this is easy to do.
There were other small bugs until this day such as: doing qb.getCount() or doing qb.getManyAndCount() with a .having() in your query does not work, so we just don't do a count and return null for this until this issue has been fixed.
As I've mentioned, although the languages are just not comparable: I'm a huge fan of PHP Laravel's query builder. Hate or not, it's the most advanced query builder out there and has a 10/10 in terms of developer experience and how nice it is to use for the developer itself. It's flexible, properly structured throughout the models and always allows you to modify things whenever you need to. Just bringing this up because this is a properly developed query builder. TypeORM is just not there yet for me personally and the requirements me and my company have for most of our projects.
I have heard about Prisma and Sequelize, but have never used them, but they look great, but I'm afraid I'll run into the same issue I had with TypeORM. Initially I thought that this is AMAZING and maybe the best one out there, but after using it, I regret using it a lot.
If you've made it all the way to here, thanks a lot. The goal of this post is to share my personal experience and to ask you all about your experience as well. Thanks a lot.
I'd love to hear if:
you have used TypeORM with MySQL (or postgresql, or anything else) and whether or not you ran into equivalent issues
you have used Prima, Sequelize or anything else (preferably in bigger projects).
Cheers.
EDIT: Thanks for the suggestions. After doing research on all of the frameworks that are out there, I think for larger projects, these would be the top 4:
Knex http://knexjs.org (highly inspired by Laravel's query builder)
Sequelize https://github.com/sequelize/sequelize
Prisma is by far the most active one and still has 5-10 maintainers actively maintaining it (if not more) and offers a lot.
Knex might be better in terms of flexibility than Prisma based on it's maturity. Still incredibly active maintained and offers a lot.
MikroORM is only maintained by 1 guy who does most of the work, so I'm worried a lot about the future and support he can give as a single person. Nonetheless, it offers a lot, has example apps and seems to work nice based on the docs.
Sequelize exists since 2011 thus can be really mature, but since January 2021 they didn't do anything anymore so I am not really sure whether this is a good choice. They have issues that sound like serious bugs that I don't want to run into.
I would maybe put Sequelize on #3, but it's not maintained anymore, but still seems to be really popular so decided to put in on #4.
If you have experience regarding these frameworks doing larger projects, please share the knowledge, experience and issues you ran into :)
r/typescript • u/gBusato • Jan 28 '22
Hey folks, I just discovered that Typescript has made 4 Cheat Sheets, guess what, for the 4 most bothering topics :
Control Flow Analysis
Interfaces
Types
Classes
Here is the link to theses gems

r/typescript • u/DanielRosenwasser • Jan 29 '24
r/typescript • u/DanielRosenwasser • Mar 09 '22
r/typescript • u/romeeres • Feb 04 '23
r/typescript • u/serg06 • Dec 15 '24
https://www.prisma.io/blog/prisma-orm-manifesto
Prisma’s architecture has historically limited community contributions. Core functionality—such as query parsing, validation, and execution—has been managed by our Rust engine, which has been opaque to our TypeScript-focused community. Expanding capabilities or fixing core issues often fell solely to our team.
We’re addressing this by migrating Prisma’s core logic from Rust to TypeScript and redesigning the ORM to make customization and extension easier.
r/typescript • u/binaryfor • May 01 '21
r/typescript • u/chibicode • Nov 22 '19
r/typescript • u/gdmr458 • Oct 22 '26
It uses content mappers, a new feature of TypeScript 7.1 (Beta).