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
|
@ -294,7 +294,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
|
|||
.finally(function () {
|
||||
if (modal) modal.close();
|
||||
})
|
||||
.then(async (res) => {
|
||||
.then(async (res): Promise<void> => {
|
||||
roomId = res.room_id;
|
||||
|
||||
room = new Promise((resolve) => {
|
||||
|
@ -303,7 +303,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
|
|||
resolve(storedRoom);
|
||||
} else {
|
||||
// The room hasn't arrived down sync yet
|
||||
const onRoom = (emittedRoom: Room) => {
|
||||
const onRoom = (emittedRoom: Room): void => {
|
||||
if (emittedRoom.roomId === roomId) {
|
||||
resolve(emittedRoom);
|
||||
client.off(ClientEvent.Room, onRoom);
|
||||
|
@ -325,7 +325,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
|
|||
);
|
||||
}
|
||||
})
|
||||
.then(async () => {
|
||||
.then(async (): Promise<void> => {
|
||||
if (opts.roomType === RoomType.ElementVideo) {
|
||||
// Set up this video room with a Jitsi call
|
||||
await JitsiCall.create(await room);
|
||||
|
@ -395,7 +395,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
|
|||
* Ensure that for every user in a room, there is at least one device that we
|
||||
* can encrypt to.
|
||||
*/
|
||||
export async function canEncryptToAllUsers(client: MatrixClient, userIds: string[]) {
|
||||
export async function canEncryptToAllUsers(client: MatrixClient, userIds: string[]): Promise<boolean> {
|
||||
try {
|
||||
const usersDeviceMap = await client.downloadKeys(userIds);
|
||||
// { "@user:host": { "DEVICE": {...}, ... }, ... }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue