From 6f65f5c2986a29debf5db58c8d3ffebd99d11665 Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Tue, 5 Jan 2021 22:45:36 +0100 Subject: [PATCH] Remove typescript type warnings --- pages/_document.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/_document.tsx b/pages/_document.tsx index f259e73..c4cbd26 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -2,14 +2,14 @@ import Document from 'next/document'; import { ServerStyleSheet } from 'styled-components'; class Doc extends Document { - static async getInitialProps(ctx) { + static async getInitialProps(ctx: any) { const sheet = new ServerStyleSheet(); const originalRenderPage = ctx.renderPage; try { ctx.renderPage = () => originalRenderPage({ - enhanceApp: App => props => sheet.collectStyles() + enhanceApp: (App: any) => (props: any) => sheet.collectStyles() }); const initialProps = await Document.getInitialProps(ctx);