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 <noreply@anthropic.com>
This commit is contained in:
parent
43db2dadc1
commit
4f88266ffa
9
gitgram/web/css-modules.d.ts
vendored
Normal file
9
gitgram/web/css-modules.d.ts
vendored
Normal file
@ -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';
|
||||
Reference in New Issue
Block a user