# typesaurus

> Type-safe ODM for Firestore

Latest version **10.7.0** (published 2024-04-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install typesaurus
pnpm add typesaurus
yarn add typesaurus
bun add typesaurus
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 10.7.0 |
| Published | 2024-04-23 |
| First published | 2019-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 533.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 443 |
| Author | Sasha Koss |
| Maintainers | kossnocorp |
| Keywords | Firebase, Firestore, TypeScript |

## Links

- npm: https://www.npmjs.com/package/typesaurus
- Repository: https://github.com/kossnocorp/typesaurus
- Homepage: https://github.com/kossnocorp/typesaurus#readme
- Issues: https://github.com/kossnocorp/typesaurus/issues
- npm.io page: https://npm.io/package/typesaurus

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 10.7.0 (latest) — 2024-04-23
- 10.0.0-rc.11 (next) — 2024-01-25
- 10.6.0 — 2024-04-12
- 10.5.0 — 2024-04-12
- 10.4.0 — 2024-04-11
- 10.3.0 — 2024-03-20
- 10.2.0 — 2024-03-07
- 10.1.0 — 2024-02-05
- 10.0.1 — 2024-01-31
- 10.0.0 — 2024-01-28
- 10.0.0-rc.10 — 2024-01-25
- 10.0.0-rc.9 — 2024-01-15
- 10.0.0-rc.8 — 2024-01-05
- 10.0.0-rc.7 — 2024-01-02
- 10.0.0-rc.6 — 2023-12-30
- … 139 more at https://npm.io/package/typesaurus/versions

## README

🎉️ NEW: [Typesaurus X is out](https://blog.typesaurus.com/typesaurus-x-is-out/)!

![](https://raw.githubusercontent.com/kossnocorp/typesaurus/main/promo.gif)

# 🦕 Typesaurus

TypeScript-first ODM for Firestore.

_Looking for **React** adaptor?_ Check [Typesaurus React](https://github.com/kossnocorp/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](https://typesaurus.com/get-started/).

## Installation

The library is available as an [npm package](https://www.npmjs.com/package/typesaurus).
To install Typesaurus, run:

```sh
npm install --save typesaurus 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._

## Features

- **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.

<!-- TODO: Do it one day
Want to read about features in detail? [Go to Key Features](https://typesaurus.com/about/features/). -->

## Changelog

See [the changelog](./CHANGELOG.md).

## License

[MIT © Sasha Koss](https://kossnocorp.mit-license.org/)

---
_Source: https://npm.io/package/typesaurus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
