Type-safe ODM for Firestore
npm install typesaurus-multi-db-support> :warning: This fork was created to implement support for other databases in Firebase.
> The original project can be found here.
> If the original project ever implements support for other databases, this fork will be archived. I do not intend to maintain this fork either.
>
> In the meantime, you can find it on npm here).
šļø NEW: Typesaurus X is out!

TypeScript-first ODM for Firestore.
_Looking for React adaptor?_ Check Typesaurus React!
Why?
- Designed with TypeScript's type inference in mind
- Universal code (browser & Node.js)
- Uncompromised type-safety
- Code autocomplete
- Say goodbye to any!
- Say goodbye to exceptions!
- Ready to start? Follow this guide.
The library is available as an npm package.
To install Typesaurus, run:
``sh`
npm install --save npm i typesaurus-multi-db-support firebase firebase-admin
_Note that Typesaurus requires the firebase package to work in the web environment and firebase-admin to work in Node.js. These packages aren't listed as dependencies, so they won't install automatically with the Typesaurus package._
- Complete type-safety: uncompromised type-safety, includes Firestore quirks.
- Universal package: reuse the same code on the client and server.
- JavaScript-native: converts Firestore data types, i.e. timestamp, to native JS types, i.e. Date`.
- Build size-efficiency: optimized build-size for web.
- Typed ids: all document ids are types, so you'll never mix up a user id with an account id.
- Centralized schema: easy to define, read and update.
- Single-import principle: single import to define, single import to use.
See the changelog.