Make more code conform to strict null checks (#10219
* Make more code conform to strict null checks * Fix types * Fix tests * Fix remaining test assertions * Iterate PR
This commit is contained in:
parent
4c79ecf141
commit
76b82b4b2b
130 changed files with 603 additions and 603 deletions
|
@ -66,7 +66,7 @@ export function determineAvatarPosition(index: number, max: number): IAvatarPosi
|
|||
}
|
||||
}
|
||||
|
||||
export function readReceiptTooltip(members: string[], hasMore: boolean): string | null {
|
||||
export function readReceiptTooltip(members: string[], hasMore: boolean): string | undefined {
|
||||
if (hasMore) {
|
||||
return _t("%(members)s and more", {
|
||||
members: members.join(", "),
|
||||
|
@ -78,8 +78,6 @@ export function readReceiptTooltip(members: string[], hasMore: boolean): string
|
|||
});
|
||||
} else if (members.length) {
|
||||
return members[0];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,7 +132,7 @@ export function ReadReceiptGroup({
|
|||
const { hidden, position } = determineAvatarPosition(index, maxAvatars);
|
||||
|
||||
const userId = receipt.userId;
|
||||
let readReceiptInfo: IReadReceiptInfo;
|
||||
let readReceiptInfo: IReadReceiptInfo | undefined;
|
||||
|
||||
if (readReceiptMap) {
|
||||
readReceiptInfo = readReceiptMap[userId];
|
||||
|
@ -161,7 +159,7 @@ export function ReadReceiptGroup({
|
|||
})
|
||||
.reverse();
|
||||
|
||||
let remText: JSX.Element;
|
||||
let remText: JSX.Element | undefined;
|
||||
const remainder = readReceipts.length - maxAvatars;
|
||||
if (remainder > 0) {
|
||||
remText = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue