Created
August 11, 2019 15:12
-
-
Save stephenway/41b5e7f622a06d8f3fd0d7ae4ecb4002 to your computer and use it in GitHub Desktop.
Next.js + Typescript Main App Class Errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class static side 'typeof MyApp' incorrectly extends base class static side 'typeof App'. | |
Types of property 'getInitialProps' are incompatible. | |
Type '({ Component, ctx }: any) => Promise<{ pageProps: {}; locale?: undefined; messages?: undefined; initialNow?: undefined; } | { query: any; authtoken: string; isLoggedIn: boolean; locale: any; messages: any; initialNow: number; pageProps?: undefined; } | { ...; }>' is not assignable to type '(context: NextAppContext<Record<string, string | string[] | undefined>, {}>) => Promise<DefaultAppIProps>'. | |
Type 'Promise<{ pageProps: {}; locale?: undefined; messages?: undefined; initialNow?: undefined; } | { query: any; authtoken: string; isLoggedIn: boolean; locale: any; messages: any; initialNow: number; pageProps?: undefined; } | { ...; }>' is not assignable to type 'Promise<DefaultAppIProps>'. | |
Type '{ pageProps: {}; locale?: undefined; messages?: undefined; initialNow?: undefined; } | { query: any; authtoken: string; isLoggedIn: boolean; locale: any; messages: any; initialNow: number; pageProps?: undefined; } | { ...; }' is not assignable to type 'DefaultAppIProps'. | |
Type '{ query: any; authtoken: string; isLoggedIn: boolean; locale: any; messages: any; initialNow: number; pageProps?: undefined; }' is not assignable to type 'DefaultAppIProps'. | |
Property 'pageProps' is optional in type '{ query: any; authtoken: string; isLoggedIn: boolean; locale: any; messages: any; initialNow: number; pageProps?: undefined; }' but required in type 'DefaultAppIProps'.ts(2417) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment