📅  最后修改于: 2022-03-11 14:48:36.801000             🧑  作者: Mango
// importing the provided NextJS type
import type { AppProps as NextAppProps } from "next/app";
// modified version - allows for custom pageProps type, falling back to 'any'
type AppProps = {
pageProps: P;
} & Omit, "pageProps">;
// use the new type like so, replacing 'CustomPageProps' with whatever you want
export default function App({
Component,
pageProps,
}: AppProps) {
//...
}