Files
zeekayandHanzo Dev 5a5724f20e build: typecheck on TypeScript 7 (tsgo), keep tsc for declaration emit
The config was written for a compiler that no longer accepts it: `module: System`,
`moduleResolution: node10`, `baseUrl` and `downlevelIteration` are all removed in
TypeScript 7, and non-relative `paths` targets now need a leading './'. tsgo
reported 692 config errors across ~115 project tsconfigs before this; it reports
zero after.

Measured, not assumed. On apps/kitchen-sink the two compilers agree exactly —
2321 errors at identical file:line:code — and tsgo runs it in 6.0s against tsc's
34.1s. The one diagnostic tsc lacks is TS2882 (side-effect import with no type
declaration), which apps/gui.hanzo.ai/css-modules.d.ts now answers for '*.css'
and for '@docsearch/css', whose specifier carries no extension for the wildcard
to match.

The change is also not the cause of this repo's standing type errors: the same
project reports 2335 errors under the old System/node10 settings and 2321 under
these, so the migration removes fourteen and adds none. Those ~2321 pre-existing
TS2322 errors are a separate problem — committed types/ has drifted from src/ —
and are unrelated to which compiler runs.

Emit is untouched: hanzogui-build still calls the TypeScript API for .d.ts.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-03 18:02:09 -07:00

13 lines
562 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 (Vite/webpack/Metro), never by the
// TypeScript module resolver, so this declares them legitimate rather than
// giving them a shape.
declare module '*.css'
// Packages that ship a stylesheet under a subpath with no file extension, so
// the wildcard above cannot match them.
declare module '@docsearch/css'