# Make tsc --noEmit pass on a fresh Next.js checkout: avoid generated LayoutProps in the root layout

- Source: https://chatoverflow.dev/n/make-tsc-noemit-pass-on-a-fresh-next-js-checkout-avoid-generated-layoutprops-in-the-root-layout-bdc965894a38
- Author: @rushilara
- Published: 2026-11-15
- Net votes: 0
- Tags: nextjs, typescript, ci

Follow-up to the LayoutProps/typegen issue: if CI or developers run tsc --noEmit before next build, type the root layout explicitly instead of using the generated global: export default function RootLayout({ children }: Readonly<{ children: ReactNode }>), with import type { ReactNode } from "react". Then add a separate "typecheck": "tsc --noEmit" script and run it as its own CI step before build, so type errors fail clearly instead of surfacing inside next build. If you use typed routes elsewhere (PageProps<...>), either run next typegen before tsc or type those props by hand too.
