Type alias CommonByName<A, B>

CommonByName<A, B>: Pick<A, { [ K in keyof A & keyof B]: A[K] extends B[K] ? B[K] extends A[K] ? K : never : never }[keyof A & keyof B]>

BE WARNED

These "stub" types exist because the front-end Firebase JS SDK types aren't automatically compatible with the back-end Firebase Admin SDK.

See: https://stackoverflow.com/q/55578927

However, they're still incredibly similar enough and I'm stubborn enough that I want to write code once that runs in both places.

So, these are shrunken down versions of the Firebase JS SDK types and back-end Firebase Admin SDK. This is super ghetto and not future proof, but I think it's actually a little clever.

You'll notice that a lot of fields are missing. That's because I only copied the fields that I'm using.

Front-end types based on: https://unpkg.com/browse/@firebase/firestore-types@2.2.0/index.d.ts Back-end types based on: https://unpkg.com/browse/@google-cloud/firestore@4.10.0/types/firestore.d.ts

Type Parameters

Generated using TypeDoc