-
-
Notifications
You must be signed in to change notification settings - Fork 827
Conform more of the codebase to strictNullChecks #10672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me. One small comment and also a question about Searching.ts - are we expecting this to be completely clear of TS issues? I see a few TS errors there.
src/utils/SortMembers.ts
Outdated
@@ -96,13 +97,14 @@ interface IMemberScore { | |||
numRooms: number; | |||
} | |||
|
|||
export function buildMemberScores(cli: MatrixClient): { [key: string]: IMemberScore | undefined } { | |||
export function buildMemberScores(cli: MatrixClient): { [key: string]: IMemberScore } { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor point - not sure if we prefer <Record<string, ...>
for cases like this (also valid elsewhere in this file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a case where the key string is uselessly key
I agree, but IMO this form is better as the key can be given a helpful name, I'll update it to userId
for self-documenting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd never considered that, makes sense
Not yet, not the best way to do things but still helps the overall goal |
For element-hq/element-web#21967
This change is marked as an internal change (Task), so will not be included in the changelog.