Skip to content

🐞[Bug]: TypeScript compilation failure in swizzled FooterLayout and Showcase subcomponents #2520

Closed

Description

@bobby404-K

Describe the bug

Running npm run typecheck (tsc --noEmit) produces three TypeScript errors across the swizzled Footer and Showcase components:

src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx(11,10): error TS2614: Module '"../../index"' has no exported member 'prepareUserState'. Did you mean to use 'import prepareUserState from "../../index"' instead?
src/pages/showcase/_components/ShowcaseTagSelect/index.tsx(20,10): error TS2614: Module '"../../index"' has no exported member 'prepareUserState'. Did you mean to use 'import prepareUserState from "../../index"' instead?
src/theme/Footer/index.tsx(11,11): error TS2739: Type '{}' is missing the following properties from type 'Props': style, links, logo, copyright

Root Causes:

  1. Footer: src/theme/Footer/index.tsx was swizzled alongside src/theme/Footer/Layout/index.tsx. The custom swizzled FooterLayout component (src/theme/Footer/Layout/index.tsx) takes no props ((): ReactNode), but src/theme/Footer/index.tsx imports FooterLayout from "@theme/Footer/Layout". In TypeScript, @theme/Footer/Layout resolves to @docusaurus/theme-classic typings which expect { style, links, logo, copyright }, resulting in TS2739.
  2. Showcase: src/pages/showcase/index.tsx was rewritten into a custom showcase component, removing prepareUserState which ShowcaseFilterToggle and ShowcaseTagSelect import, causing TS2614.

Expected behavior

  1. src/theme/Footer/index.tsx should import the local swizzled FooterLayout from ./Layout instead of @theme/Footer/Layout.
  2. src/pages/showcase/index.tsx should export prepareUserState (e.g. export const prepareUserState = () => undefined;).
  3. tsc --noEmit should pass without any type errors for these files.

Activity

  1. github-actions commented on Nov 14, 2026

    @github-actions

    Thanks for opening this issue! 🎉 We'll look into it as soon as possible, estimated time for response is 5–8 hrs.

    Don't raise PR unless assigned to you.

    In the meantime, please provide all necessary details and context to your issue — screenshots or videos of your changes help speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊

    Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your issue goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv.

    We are here to help you on this journey of open source. Consistent contributions are eligible for sponsorship 💰

    🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨

    📚Resources which can help you know more about Github 👇🏻

    1. End to End GitHub Beginner Playlist: GitHub Playlist.

    2. Build your GitHub Profile: GitHub Profile Optimisation.

    3. GitHub Handbook for dummies: GitHub Blog for Beginners.

  2. github-actions commented on Nov 14, 2026

    @github-actions

    Thanks for opening this issue. To help maintainers review it faster, please add the missing details below:

    • Fill in the "Describe the bug" section.
    • Fill in the "Expected behavior" section.
  3. bobby404-K commented on Nov 14, 2026

    @bobby404-K
    MemberAuthor

    assign me @sanjay-kv

  4. github-actions commented on Nov 15, 2026

    @github-actions

    👤 Issue assigned to @bobby404-K.

  5. github-actions commented on Nov 15, 2026

    @github-actions

    ✅ This issue has been closed. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

level 110 pointsrecodethis is label for leaderboard

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions