mirror of
https://github.com/hanzoai/computer.git
synced 2026-09-30 20:55:46 +00:00
TypeScript 7 reports TS2882 for a stylesheet side-effect import with no type declaration; TS 5.x accepted them silently. Bundlers resolve stylesheets through their own loaders, so the import never reaches the TypeScript module resolver — this declares them legitimate rather than giving them a shape. MEASURED, not assumed: this repo reports TS2882 under tsc 7 without the file and zero with it. Repos where a framework already ships ambient CSS declarations (Next's next-env.d.ts) were left alone — the declaration is inert there and was not added. Co-authored-by: Hanzo Dev <[email protected]>
9 lines
410 B
TypeScript
9 lines
410 B
TypeScript
// TypeScript 7 reports TS2882 for a side-effect import with no type
|
|
// declaration ("Cannot find module or type declarations for side-effect import
|
|
// of './globals.css'"). TS 5.x accepted these silently.
|
|
//
|
|
// Stylesheets are resolved by the bundler (Next/Vite/webpack), never by the
|
|
// TypeScript module resolver, so this declares them legitimate rather than
|
|
// giving them a shape.
|
|
declare module '*.css';
|