Skip to content

kossnocorp/typesaurus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

38a5f02 Β· Apr 23, 2024
Apr 2, 2024
Mar 8, 2023
Dec 27, 2023
Jan 1, 2023
Dec 25, 2023
Apr 23, 2024
Dec 26, 2023
Aug 12, 2019
Jun 7, 2023
Jan 1, 2023
Dec 25, 2023
Dec 25, 2023
Dec 25, 2023
Apr 23, 2024
Jan 2, 2020
Apr 11, 2024
Jan 31, 2024
Dec 25, 2023
Dec 25, 2023
Jan 1, 2023
Apr 23, 2024
Apr 23, 2024
Jan 31, 2024
Dec 25, 2023
Mar 20, 2024
Dec 25, 2023
Jan 24, 2024
Dec 25, 2023
Dec 26, 2023

Repository files navigation

πŸŽ‰οΈ NEW: Typesaurus X is out!

πŸ¦• Typesaurus

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.

Installation

The library is available as an npm package. To install Typesaurus, run:

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.

Changelog

See the changelog.

License

MIT Β© Sasha Koss