I am working on a Next.js project and I've added ESLint to it so I've to add PropTypes to each file. Here is the app.jsx component where the props are, Component, pageProps:
const App = ({ Component, pageProps: { session, ...pageProps } }) => {
const getLayout = Component.getLayout || ((page) => page);
return (
<ThemeProvider theme={theme}>
{globalStyles}
{getLayout(<Component {...pageProps} />)}
</ThemeProvider>
);
};
The PropType of the Component is know but does anyone know how we can define a PropType for pageProps knowing that the project is in JavaScript not TypeScript?