From 4f88266ffaf74a6cb2fa1a6f0272358570e73539 Mon Sep 17 00:00:00 2001 From: caelum0x Date: Sun, 6 Sep 2026 12:13:55 +0300 Subject: [PATCH] chore(web): declare css modules so tsc typecheck gate passes Raw `tsc --noEmit` (the configured web typecheck gate) errored TS2882 on side-effect stylesheet imports (import './globals.css', cropperjs css) because next-env.d.ts does not declare *.css. Next's build handles these; add an ambient declaration so the typecheck gate matches build reality. Typecheck now exits 0. Co-Authored-By: Claude Fable 5 --- gitgram/web/css-modules.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 gitgram/web/css-modules.d.ts diff --git a/gitgram/web/css-modules.d.ts b/gitgram/web/css-modules.d.ts new file mode 100644 index 00000000..238a726b --- /dev/null +++ b/gitgram/web/css-modules.d.ts @@ -0,0 +1,9 @@ +// Ambient declarations for side-effect stylesheet imports. +// +// Next.js compiles CSS imports at build time, but a raw `tsc --noEmit` (the +// configured typecheck gate) has no knowledge of `.css` files and errors on +// `import './globals.css'` style side-effect imports (TS2882). Declaring the +// modules here keeps the typecheck gate green without affecting the build. +declare module '*.css'; +declare module '*.scss'; +declare module '*.sass';