| 116 | } |
| 117 | |
| 118 | export class User implements IUser { |
| 119 | _native: FIRUser; |
| 120 | get native() { |
| 121 | return this._native; |
| 122 | } |
| 123 | |
| 124 | get ios() { |
| 125 | return this.native; |
| 126 | } |
| 127 | |
| 128 | static fromNative(user: FIRUser) { |
| 129 | if (user instanceof FIRUser) { |
| 130 | const usr = new User(); |
| 131 | usr._native = user; |
| 132 | return usr; |
| 133 | } |
| 134 | return null; |
| 135 | } |
| 136 | |
| 137 | get displayName(): string { |
| 138 | return this.native?.displayName; |
| 139 | } |
| 140 | |
| 141 | get anonymous() { |
| 142 | return this.native?.anonymous(); |
| 143 | } |
| 144 | |
| 145 | get emailVerified(): boolean { |
| 146 | return this.native?.emailVerified(); |
| 147 | } |
| 148 | |
| 149 | get email(): string { |
| 150 | return this.native?.email; |
| 151 | } |
| 152 | |
| 153 | get uid(): string { |
| 154 | return this.native?.uid; |
| 155 | } |
| 156 | |
| 157 | get phoneNumber(): string { |
| 158 | return this.native?.phoneNumber; |
| 159 | } |
| 160 | |
| 161 | get providerId(): string { |
| 162 | return this.native?.providerID; |
| 163 | } |
| 164 | |
| 165 | get photoURL(): string { |
| 166 | return this.native?.photoURL?.absoluteString; |
| 167 | } |
| 168 | |
| 169 | get metadata(): UserMetadata { |
| 170 | return UserMetadata.fromNative(this.native?.metadata); |
| 171 | } |
| 172 | |
| 173 | get providerData(): UserInfo[] { |
| 174 | const providerData = this.native.providerData; |
| 175 | const count = providerData.count; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…