Installation
FirelordJS 烈火君JS
High Precision Firestore Web Typescript Wrapper, Providing Unparalleled Type Safe and Dev Experience
Modular, Minuscule, Intuitive, Unopinionated, Craftsmanship, Ultimate, Peaceful, Deep
Of The VFQAT || By The VFQAT || For The VFQAT
Be The Master Of Your Fire, Be Firelord
Beyond Typing
caution
require Typescript 5.4.2+, Firebase 10+ and @firebase/rules-unit-testing 3+
Always install FirelordJS v2.CURRENT.LATEST.
Web
npm i firebase firelordjs
npm i -D @firebase/rules-unit-testing typescript
Web(cjs)
if above version does not work, you might need the cjs version, see what happened.
npm i firebase@cjs firelordjs
npm i -D @firebase/rules-unit-testing typescript
Admin
npm i firebase-admin firelord
npm i -D typescript
Typescript Configuration
tsconfig.json
{
// ...other configs
"compilerOptions": {
// ...other options
"strict": true, // compulsory
"noUncheckedIndexedAccess": true, // compulsory
"exactOptionalPropertyTypes": true // optional and does not affect how Firelord works but is recommended for general use cases
}
}
VS Code Configuration
Optional but recommended.
So VS Code will always use your project's Typescript, not VS Code Typescript.
VS Code configuration