Skip to content

Tag: typescript

SEQUELIZE AND TYPESCRIPT

As many .NET developers transitioning to the world of Node, I started looking for an ORM. After some research, I found sequelize which seems widely adopted by the community.

I’m using typescript, and I quickly found the way to define the model with sequelize a bit too verbose, and especially a duplication of the typescript class.

That’s when I discovered sequelize-typescript, which provides this bridge, and leverages typescript’s typings, so mapping can be transparent if so we wish. All it takes is to extend a base Model class, and some annotations.