Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript issue with ComponentType #68

Closed
pmarsceill opened this issue Dec 18, 2021 · 2 comments
Closed

TypeScript issue with ComponentType #68

pmarsceill opened this issue Dec 18, 2021 · 2 comments

Comments

@pmarsceill
Copy link

pmarsceill commented Dec 18, 2021

next-themes works great, but curious how to resolve this type issue in _app.tsx

image

@pacocoursey
Copy link
Owner

You can extend the NextPage type. Documentation here: https://nextjs.org/docs/basic-features/layouts

import type { NextPage } from 'next'

export default function App({ Component, pageProps }: { Component: NextPage & { theme?: string }) {

@pmarsceill
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants