Improve quality of Typescript types (#10742)

This commit is contained in:
Michael Telatynski 2023-05-05 09:11:14 +01:00 committed by GitHub
parent 542bf68c63
commit a4f0b80692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 74 additions and 75 deletions

View file

@ -44,7 +44,7 @@ const FORCED_USER_REGEX = /[^/,:; \t\n]\S*/g;
export default class UserProvider extends AutocompleteProvider {
public matcher: QueryMatcher<RoomMember>;
public users: RoomMember[] | null;
public users?: RoomMember[];
public room: Room;
public constructor(room: Room, renderingType?: TimelineRenderingType) {
@ -98,7 +98,7 @@ export default class UserProvider extends AutocompleteProvider {
if (state.roomId !== this.room.roomId) return;
// blow away the users cache
this.users = null;
this.users = undefined;
};
public async getCompletions(