JSPM

firelordjs

1.5.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 78
  • Score
    100M100P100Q98132F
  • License MIT

🔥 Extremely High Precision Typescript Wrapper for Firestore Web, Providing Unparalleled Type Safe and Dev Experience

Package Exports

  • firelordjs
  • firelordjs/dist/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (firelordjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

FirelordJS 烈火君JS

Created by tylim88   License   dependency count   package size   github action   code coverage   GitHub issues   code coverage   Total alerts   Language grade: JavaScript

Extremely High Precision Typescript Wrapper for Firestore Web, Providing Unparalleled Type Safe and Dev Experience

Modular, Minuscule, Intuitive, Unopinionated, Craftsmanship, Ultimate, Peaceful, Deep

Of The VFQAT   ||   By The VFQAT   ||   For The VFQAT

End Firestore Typing Madness


FirelordJS is the only library that capable of providing insane type safety while exposing almost all the API of the original Firestore SDK.

FirelordJS has:

  • The lowest learning curve (API is nearly identical to the original API).
  • The lowest technical debt (easiest to revert to the original API).
  • The best type safety**.
  • The only library that capable of type against runtime errors.
  • Possibly also the smallest.

It is what you are looking at: the Master of Fire.

Support @firebase/rules-unit-testing

What is tested:

  • Development code: check correctness
  • Built code: check compiler setting
  • Published code are all tested in CI: check package.json entry point

** I am confident it is the best. If you found something better, I will buy you 10 cups of coffee and 100 cups of coffee if you can create something better.

Contribution

(The lower it goes, the harder it is)

  1. For starter, you can refactor files in src/types folder, especially src/types/queryConstraintLimitation.ts.

  2. Simplify type logic and remove dead code.

  3. Utilizing the latest Typescript feature, like extends Constraints on infer Type Variables to reduce code length.

  4. Improve tests.

  5. You can also work on the documentation.

  6. You can help to implement the exact same type logics for NodeJS Admin version, the admin version is still using the old logics.

    Note that there is no V9 for admin, so we need to rewrite the runtime wrapper for it to looks like V9. We must reuse the type logics and tests code for consistency.

  7. Looking for a challenge? Then you can try to implement mandatory field type:

    • It is a special type that assign (with union) to object member.
    • Members with such type become required even in update operations(all members in update operations are partial by default).

    Practical usage is something like updatedAt member that keep track of document last updated time.

    Basically just turn an optional member into a required member but due to inner complexity, this is not going to be easy.

    If you want to work on this, come to me first to discuss the implementation strategy, I will provide all information you need to carry out this commit.

  8. Or just spread the word. 🙂

  1. Firelord - Typescript wrapper for Firestore Admin
  2. Firelordrn - Typescript wrapper for Firestore React Native
  3. FireLaw - Write Firestore security rule with Typescript, utilizing Firelord type engine.
  4. FireCall - Helper Function to write easier and safer Firebase onCall function.