Skip to content

Commit

Permalink
Enable strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
HaNdTriX committed Sep 28, 2022
1 parent a9b1a1d commit 9cce529
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions examples/with-react-intl/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import type { AppProps } from 'next/app'
import type { MessageConfig } from '../helper/loadIntlMessages'
import { IntlProvider } from 'react-intl'
import { useRouter } from 'next/router'

export default function MyApp({ Component, pageProps }: AppProps) {
export default function MyApp({
Component,
pageProps,
}: AppProps<{ intlMessages: MessageConfig }>) {
const { locale, defaultLocale } = useRouter()
return (
<IntlProvider
locale={locale}
locale={locale as string}
defaultLocale={defaultLocale}
messages={pageProps.intlMessages}
>
Expand Down
2 changes: 1 addition & 1 deletion examples/with-react-intl/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
Expand Down

0 comments on commit 9cce529

Please sign in to comment.