Add return types

This commit is contained in:
RMidhunSuresh 2023-01-24 12:12:35 +05:30
parent afee565eb7
commit b86fdd476f
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@ export abstract class BaseToastNotificationViewModel<T extends BaseClassOptions
super(options); super(options);
} }
dismiss() { dismiss(): void {
this.getOption("dismiss")(); this.getOption("dismiss")();
} }
} }

View File

@ -53,7 +53,7 @@ export class CallToastNotificationViewModel extends BaseToastNotificationViewMod
})); }));
} }
async join() { async join(): Promise<void> {
await this.logAndCatch("CallToastNotificationViewModel.join", async (log) => { await this.logAndCatch("CallToastNotificationViewModel.join", async (log) => {
const stream = await this.platform.mediaDevices.getMediaTracks(false, true); const stream = await this.platform.mediaDevices.getMediaTracks(false, true);
const localMedia = new LocalMedia().withUserMedia(stream); const localMedia = new LocalMedia().withUserMedia(stream);
@ -79,19 +79,19 @@ export class CallToastNotificationViewModel extends BaseToastNotificationViewMod
return this.call.members.size; return this.call.members.size;
} }
get avatarLetter() { get avatarLetter(): string {
return avatarInitials(this.roomName); return avatarInitials(this.roomName);
} }
get avatarColorNumber() { get avatarColorNumber(): number {
return getIdentifierColorNumber(this.room.avatarColorId); return getIdentifierColorNumber(this.room.avatarColorId);
} }
avatarUrl(size: number) { avatarUrl(size: number): string | undefined {
return getAvatarHttpUrl(this.room.avatarUrl, size, this.platform, this.room.mediaRepository); return getAvatarHttpUrl(this.room.avatarUrl, size, this.platform, this.room.mediaRepository);
} }
get avatarTitle() { get avatarTitle(): string {
return this.roomName; return this.roomName;
} }
} }