Fix type errors

pull/256/head
Candid Dauth 2024-03-09 04:46:43 +01:00
rodzic 082fa4379c
commit d7f3524d91
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -24,11 +24,11 @@
const itemIconRefs = reactive(new Map<string, HTMLElement>());
const legend1Html = computed(() => {
return props.legend1 ? markdownBlock(props.legend1) : "";
return props.legend1 ? markdownBlock(props.legend1, true) : "";
});
const legend2Html = computed(() => {
return props.legend2 ? markdownBlock(props.legend2) : "";
return props.legend2 ? markdownBlock(props.legend2, true) : "";
});
function toggleFilter(typeInfo: LegendType, item?: LegendItem): void {

Wyświetl plik

@ -1,7 +1,7 @@
import fetch from "node-fetch";
import * as yauzl from "yauzl-promise";
import * as svgo from "svgo";
import cheerio from "cheerio";
import { load, type Element } from "cheerio";
import { writeFile } from "fs/promises";
import { fileURLToPath } from "url";
import { Readable } from "stream";
@ -30,11 +30,11 @@ async function updateIcons() {
function cleanIcon(icon: string): string {
const optimized = svgo.optimize(icon);
const $ = cheerio.load(optimized.data, {
const $ = load(optimized.data, {
xmlMode: true
});
for (const el of $("*").toArray() as cheerio.TagElement[]) {
for (const el of $("*").toArray() as Element[]) {
el.name = el.name.replace(/^svg:/, "");
}

Wyświetl plik

@ -16,7 +16,7 @@ export default defineConfig({
formats: ['es']
},
rollupOptions: {
external: (id) => !id.startsWith("./") && !id.startsWith("../") && /* resolved internal modules */ !id.startsWith("/")
external: (id) => id.includes("/node_modules/") || (!id.startsWith("./") && !id.startsWith("../") && /* resolved internal modules */ !id.startsWith("/"))
}
}
});