Strongly typed services with Mongoose and TypeScript

Tom Nagle
Level Up Coding
Published in
3 min readJan 10, 2021

--

In a previous post, we explored how to integrate TypeScript with your Mongoose models. In this post, we’ll move up to the service layer and see how we can use Mongoose types to get even more out of your application's Mongoose & Typescript implementations.

Firstly let’s answer some basic questions about the service layer: what is a service layer and how do I use it?

--

--

I am a full stack JavaScript developer, living in Melbourne, Australia. My preferred stack is Mongoose, TypeScript, Node.js, React & GraphQL.