Conform more of the codebase to strictNullChecks
(#10842)
This commit is contained in:
parent
5eea2c8b02
commit
82e32035fd
24 changed files with 126 additions and 93 deletions
|
@ -117,9 +117,9 @@ export abstract class Member {
|
|||
|
||||
/**
|
||||
* Gets the MXC URL of this Member's avatar. For users this should be their profile's
|
||||
* avatar MXC URL or null if none set. For 3PIDs this should always be null.
|
||||
* avatar MXC URL or null if none set. For 3PIDs this should always be undefined.
|
||||
*/
|
||||
public abstract getMxcAvatarUrl(): string | null;
|
||||
public abstract getMxcAvatarUrl(): string | undefined;
|
||||
}
|
||||
|
||||
export class DirectoryMember extends Member {
|
||||
|
@ -144,8 +144,8 @@ export class DirectoryMember extends Member {
|
|||
return this._userId;
|
||||
}
|
||||
|
||||
public getMxcAvatarUrl(): string | null {
|
||||
return this.avatarUrl ?? null;
|
||||
public getMxcAvatarUrl(): string | undefined {
|
||||
return this.avatarUrl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,8 +173,8 @@ export class ThreepidMember extends Member {
|
|||
return this.id;
|
||||
}
|
||||
|
||||
public getMxcAvatarUrl(): string | null {
|
||||
return null;
|
||||
public getMxcAvatarUrl(): string | undefined {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue