-
-
Notifications
You must be signed in to change notification settings - Fork 831
Conform more of the codebase to strictNullChecks
#10842
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.
Just the one non-blocking question, looks good to me
src/stores/WidgetStore.ts
Outdated
export function isAppWidget(widget: IWidget | IApp): widget is IApp { | ||
return typeof widget["roomId"] === "string"; | ||
} | ||
|
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 piece of work I started a Typeguards.ts
file in the src folder. I'm still not entirely sure if it would be better to put typeguards in one file, or always keep them closer to what they're guarding for, like here.
What do you think? Better to keep here or consolidate in a single typeguards 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.
My personal preference is closer to the object, in you case I think it makes sense for generic ones which don't apply to a specific type, like null
For element-hq/element-web#21967
Split into meaningful commits to aid review
This change is marked as an internal change (Task), so will not be included in the changelog.