Enable @typescript-eslint/explicit-function-return-type
in /src (#9788)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier * Enable `@typescript-eslint/explicit-function-return-type` in /src * Fix types * tsc strict fixes * Delint * Fix test * Fix bad merge
This commit is contained in:
parent
7a36ba0fde
commit
030b7e90bf
683 changed files with 3459 additions and 3013 deletions
|
@ -54,14 +54,14 @@ export class MediaEventHelper implements IDestroyable {
|
|||
);
|
||||
}
|
||||
|
||||
public destroy() {
|
||||
public destroy(): void {
|
||||
if (this.media.isEncrypted) {
|
||||
if (this.sourceUrl.present) URL.revokeObjectURL(this.sourceUrl.cachedValue);
|
||||
if (this.thumbnailUrl.present) URL.revokeObjectURL(this.thumbnailUrl.cachedValue);
|
||||
}
|
||||
}
|
||||
|
||||
private prepareSourceUrl = async () => {
|
||||
private prepareSourceUrl = async (): Promise<string> => {
|
||||
if (this.media.isEncrypted) {
|
||||
const blob = await this.sourceBlob.value;
|
||||
return URL.createObjectURL(blob);
|
||||
|
@ -70,7 +70,7 @@ export class MediaEventHelper implements IDestroyable {
|
|||
}
|
||||
};
|
||||
|
||||
private prepareThumbnailUrl = async () => {
|
||||
private prepareThumbnailUrl = async (): Promise<string> => {
|
||||
if (this.media.isEncrypted) {
|
||||
const blob = await this.thumbnailBlob.value;
|
||||
if (blob === null) return null;
|
||||
|
@ -80,7 +80,7 @@ export class MediaEventHelper implements IDestroyable {
|
|||
}
|
||||
};
|
||||
|
||||
private fetchSource = () => {
|
||||
private fetchSource = (): Promise<Blob> => {
|
||||
if (this.media.isEncrypted) {
|
||||
const content = this.event.getContent<IMediaEventContent>();
|
||||
return decryptFile(content.file, content.info);
|
||||
|
@ -88,7 +88,7 @@ export class MediaEventHelper implements IDestroyable {
|
|||
return this.media.downloadSource().then((r) => r.blob());
|
||||
};
|
||||
|
||||
private fetchThumbnail = () => {
|
||||
private fetchThumbnail = (): Promise<Blob> => {
|
||||
if (!this.media.hasThumbnail) return Promise.resolve(null);
|
||||
|
||||
if (this.media.isEncrypted) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue