Skip to content

Conversation

@JoeyC-Dev
Copy link
Contributor

@JoeyC-Dev JoeyC-Dev commented Jan 31, 2026

Type of change

  • Bug fix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please describe):

Checklist

  • I have read the CONTRIBUTING document.
  • I have checked to ensure that this Pull Request is not for personal changes.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings.

Related Issue

Fix: #722

Changes

  1. Fix type compatibility in ArchivePanel.svelte by updating category to accept string | null.
  2. Add @ts-ignore for LightDarkSwitch client directive in Navbar.astro.
  3. Rename unused parameter in language-badge.ts to suppress warning.
  4. Add required props to ArchivePanel in archive.astro. (required after applying fix 1)

Resolved errors/warnings:

src/pages/archive.astro:12:19 - error ts(2322): Type 'PostForList[]' is not assignable to type 'Post[]'.
  Type 'PostForList' is not assignable to type 'Post'.
    The types of 'data.category' are incompatible between these types.
      Type 'string | null' is not assignable to type 'string | undefined'.
        Type 'null' is not assignable to type 'string | undefined'.

12     <ArchivePanel sortedPosts={sortedPostsList} client:only="svelte"></ArchivePanel>
src/components/Navbar.astro:54:14 - error ts(2322): Type '{ "client:only": string; }' is not assignable to type 'IntrinsicAttributes & Record<string, never>'.
  Type '{ "client:only": string; }' is not assignable to type 'Record<string, never>'.
    Property 'client:only' is incompatible with index signature.
      Type 'string' is not assignable to type 'never'.

54             <LightDarkSwitch client:only="svelte"></LightDarkSwitch>
src/plugins/expressive-code/language-badge.ts:10:16 - warning ts(6133): '_cssVar' is declared but its value is never read.

10   baseStyles: ({ _cssVar }) => `
src/pages/archive.astro:12:6 - error ts(2322): Type '{ sortedPosts: PostForList[]; "client:only": string; }' is not assignable to type 'IntrinsicAttributes & { tags: string[]; categories: string[]; sortedPosts?: Post[] | undefined; } & { $$events?: { [evt: string]: CustomEvent<any>; } | undefined; $$slots?: {} | undefined; }'.
  Type '{ sortedPosts: PostForList[]; "client:only": string; }' is missing the following properties from type '{ tags: string[]; categories: string[]; sortedPosts?: Post[] | undefined; }': tags, categories

12     <ArchivePanel sortedPosts={sortedPostsList} client:only="svelte"></ArchivePanel>

How To Test

See the Astro Check result of this PR.

Screenshots (if applicable)

image

@vercel
Copy link

vercel bot commented Jan 31, 2026

@JoeyC-Dev is attempting to deploy a commit to the zephyirdgmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@JoeyC-Dev JoeyC-Dev mentioned this pull request Feb 2, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Astro check failure

1 participant