Remove some uses of as any[]

This commit is contained in:
Michcio 2022-09-25 16:15:16 +02:00
parent f17eb379ac
commit 80a2bc401a
3 changed files with 4 additions and 4 deletions

View file

@ -104,7 +104,7 @@ async function fetchNodeinfo(instance: Instance): Promise<NodeInfo> {
throw new Error('No wellknown links');
}
const links = wellknown.links as any[];
const links = wellknown.links;
const lnik1_0 = links.find(link => link.rel === 'http://nodeinfo.diaspora.software/ns/schema/1.0');
const lnik2_0 = links.find(link => link.rel === 'http://nodeinfo.diaspora.software/ns/schema/2.0');

View file

@ -23,7 +23,7 @@ export async function createMessage(user: { id: User['id']; host: User['host'];
text: text ? text.trim() : null,
userId: user.id,
isRead: false,
reads: [] as any[],
reads: [] as string[],
uri,
} as MessagingMessage;

View file

@ -1,4 +1,4 @@
import { Brackets, In, IsNull, Not } from 'typeorm';
import { Brackets, FindOptionsWhere, In, IsNull, Not } from 'typeorm';
import { publishNoteStream } from '@/services/stream.js';
import renderDelete from '@/remote/activitypub/renderer/delete.js';
import renderAnnounce from '@/remote/activitypub/renderer/announce.js';
@ -106,7 +106,7 @@ async function findCascadingNotes(note: Note): Promise<Note[]> {
}
async function getMentionedRemoteUsers(note: Note): Promise<IRemoteUser[]> {
const where = [] as any[];
const where: FindOptionsWhere<User>[] = [];
// mention / reply / dm
if (note.mentions.length > 0) {