Skip to content

Instantly share code, notes, and snippets.

@JonCatmull
Created September 6, 2023 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonCatmull/ee65ec870d70c4a3b2c35ecd85aad8d4 to your computer and use it in GitHub Desktop.
Save JonCatmull/ee65ec870d70c4a3b2c35ecd85aad8d4 to your computer and use it in GitHub Desktop.
/**
* Gets the document type from a Firestore DocumentReference
*/
export type DocumentReferenceType<T> = T extends DocumentReference<infer U> ? U : never;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment