Fixing most svelte check issues.

This commit is contained in:
Bradley Shellnut 2025-08-13 19:24:57 -07:00
parent 9a1b2ed293
commit d18f6b0a9f
8 changed files with 17 additions and 24 deletions

View file

@ -35,7 +35,7 @@
{textData?.text} {textData?.text}
{/if} {/if}
{#if textData?.showIcon} {#if textData?.showIcon}
{@render linkIcon?.(iconData ?? {})} {@render linkIcon(iconData ?? {})}
{/if} {/if}
{#if textData?.location === "bottom" || (textData?.location === "right" && textData?.text)} {#if textData?.location === "bottom" || (textData?.location === "right" && textData?.text)}
{textData?.text} {textData?.text}
@ -44,7 +44,7 @@
{/snippet} {/snippet}
{#snippet linkIcon({ type, icon, iconClass }: LinkIconType)} {#snippet linkIcon({ type, icon, iconClass }: LinkIconType)}
{#if type === "svg" && icon} {#if type === "svg" && icon && typeof icon === 'function' && icon.length !== undefined}
<svg <svg
style="width: 2.5rem; height: 2.5rem;" style="width: 2.5rem; height: 2.5rem;"
class={iconClass ?? ""} class={iconClass ?? ""}
@ -52,7 +52,7 @@
viewBox="0 0 24 24" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
> >
{@render icon?.()} {@render (icon as any)()}
</svg> </svg>
{:else if type === "icon" && icon} {:else if type === "icon" && icon}
{@const Icon = icon} {@const Icon = icon}

View file

@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import type { Snippet } from 'svelte'; import type { Snippet } from 'svelte';
import type { Picture } from 'vite-imagetools'; import type { Picture } from 'vite-imagetools';
import { ExternalLinkType } from '../types/externalLinkType'; import type { ExternalLinkType } from '../types/externalLinkType';
const { const {
links, links,
@ -15,8 +15,8 @@ const {
fetchpriority = 'auto', fetchpriority = 'auto',
loading = 'lazy', loading = 'lazy',
}: { }: {
links: Snippet<ExternalLinkType[]>; links: Snippet<[ExternalLinkType[]]>;
details: Snippet<string>; details: Snippet<[]>;
portfolioDetails: string; portfolioDetails: string;
externalLinks: ExternalLinkType[]; externalLinks: ExternalLinkType[];
name: string; name: string;

View file

@ -1,4 +1,4 @@
<script module> <script module lang="ts">
export { blueSkyIcon, dockerIcon, drizzleIcon, honoIcon, gitHubIcon, linkedInIcon, lucideIcon, nextDotJsIcon, reactIcon, svelteIcon, typescriptIcon, xIcon }; export { blueSkyIcon, dockerIcon, drizzleIcon, honoIcon, gitHubIcon, linkedInIcon, lucideIcon, nextDotJsIcon, reactIcon, svelteIcon, typescriptIcon, xIcon };
</script> </script>
@ -46,7 +46,7 @@
<path fill="currentColor" d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"/> <path fill="currentColor" d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"/>
{/snippet} {/snippet}
{#snippet lucideIcon(icon)} {#snippet lucideIcon(icon: any)}
{@const Icon = icon} {@const Icon = icon}
<Icon /> <Icon />
{/snippet} {/snippet}

View file

@ -17,11 +17,9 @@
</script> </script>
<ExternalLink <ExternalLink
ariaLabel={ariaLabel} linkData={{ href, ariaLabel, clazz }}
href={href}
linkClass={clazz}
icon={lucideIcon}
textData={textData} textData={textData}
iconData={{ type: 'icon', icon }}
/> />
<style lang="postcss"> <style lang="postcss">

View file

@ -13,9 +13,8 @@ export async function GET({ url }) {
const page = url.searchParams.get('page') ?? undefined; const page = url.searchParams.get('page') ?? undefined;
const content = url.searchParams.get('content') ?? ''; const content = url.searchParams.get('content') ?? '';
// @ts-expect-error: Argument of type 'typeof SocialImageCard__SvelteComponent_' is not assignable to parameter of type 'SvelteComponent<any, any, any>'
return componentToPng( return componentToPng(
SocialImageCard, SocialImageCard as any,
{ {
header, header,
page, page,

View file

@ -1,13 +1,9 @@
<script lang="ts"> <script lang="ts">
import ExternalLink from "$lib/components/ExternalLink.svelte"; import ExternalLink from "$lib/components/ExternalLink.svelte";
import Portfolio from "./Portfolio.svelte"; import Portfolio from "./Portfolio.svelte";
// @ts-expect-error: Cannot find module '$lib/content/uses/development.md' or its corresponding type declarations.ts(2307)
// import OldWebsite from "$lib/content/portfolio/personal/old-website.md"; // import OldWebsite from "$lib/content/portfolio/personal/old-website.md";
// @ts-expect-error: Cannot find module '$lib/content/uses/development.md' or its corresponding type declarations.ts(2307)
// import PersonalWebsiteSvelteKit from "$lib/content/portfolio/personal/personal-website-sveltekit.md"; // import PersonalWebsiteSvelteKit from "$lib/content/portfolio/personal/personal-website-sveltekit.md";
// @ts-expect-error: Cannot find module '$lib/content/uses/development.md' or its corresponding type declarations.ts(2307)
// import WeddingWebsite from "$lib/content/portfolio/personal/wedding-website.md"; // import WeddingWebsite from "$lib/content/portfolio/personal/wedding-website.md";
// @ts-expect-error: Cannot find module '$lib/content/uses/development.md' or its corresponding type declarations.ts(2307)
// import MarkShellnutArchitect from "$lib/content/portfolio/professional/mark-shellnut-architect.md"; // import MarkShellnutArchitect from "$lib/content/portfolio/professional/mark-shellnut-architect.md";
import type { ExternalLinkType } from "$lib/types/externalLinkType"; import type { ExternalLinkType } from "$lib/types/externalLinkType";
import { Tabs } from "bits-ui"; import { Tabs } from "bits-ui";

View file

@ -14,7 +14,7 @@
loading = "lazy", loading = "lazy",
children, children,
}: { }: {
links: Snippet<ExternalLinkType[]>; links: Snippet<[ExternalLinkType[]]>;
externalLinks: ExternalLinkType[]; externalLinks: ExternalLinkType[];
name: string; name: string;
src: string | Picture; src: string | Picture;

View file

@ -1,9 +1,9 @@
<script lang="ts"> <script lang="ts">
import desktop from '$lib/assets/images/Desktop_so_clean.jpg?enhanced'; import desktop from '$lib/assets/images/Desktop_so_clean.jpg?enhanced';
import ExternalLink from '$lib/components/ExternalLink.svelte'; import ExternalLink from '$lib/components/ExternalLink.svelte';
import Development from './development.svelte'; import Development from './development.svelte';
import HardwareAccessories from './hardware-accessories.svelte'; import HardwareAccessories from './hardware-accessories.svelte';
import PrivacyHardwareSoftware from './privacy-hardware-software.svelte'; import PrivacyHardwareSoftware from './privacy-hardware-software.svelte';
</script> </script>
<div class="uses"> <div class="uses">