We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db5f2d3 commit 97d7c83Copy full SHA for 97d7c83
src/providers/auth.ts
@@ -22,10 +22,19 @@
22
23
import { auth } from 'firebase-functions';
24
25
+type PartialWithoutToJSON<T> = Partial<Omit<T, 'toJSON'>>;
26
+type PartialUserRecord = Omit<
27
+ PartialWithoutToJSON<auth.UserRecord>,
28
+ 'metadata' | 'providerData'
29
+> & {
30
+ metadata?: PartialWithoutToJSON<auth.UserRecordMetadata>;
31
+ providerData?: Array<PartialWithoutToJSON<auth.UserInfo>>;
32
+};
33
+
34
/** Create a UserRecord. */
35
export function makeUserRecord(
36
/** Fields of AuthRecord that you'd like to specify. */
- fields: { [key: string]: string | boolean }
37
+ fields: PartialUserRecord
38
): auth.UserRecord {
39
return auth.userRecordConstructor(Object.assign({ uid: '' }, fields));
40
}
0 commit comments