fixup: better typing

This commit is contained in:
waltem01 2024-03-15 07:30:10 +01:00
parent 100d37e552
commit 6333a2bac7

View File

@ -19,8 +19,8 @@ export const GET: RequestHandler = async ({ url }) => {
// Get all sources of posts // Get all sources of posts
const regex = /<img[^>]+role="presentation"[^>]+src="(.*?)"[^>]*>/g; const regex = /<img[^>]+role="presentation"[^>]+src="(.*?)"[^>]*>/g;
let results = [], const results: string[] = [];
match; let match: RegExpExecArray | null;
while ((match = regex.exec(text)) !== null) results.push(match[1]); while ((match = regex.exec(text)) !== null) results.push(match[1]);
// Return source data // Return source data