Conversation
The type build (tsc -p tsconfig.build.json, emitDeclarationOnly) keeps side-effect imports like `import './AddPlugShowcase.scss'` in the emitted .d.ts files under static/types/, but the ambient module shim frontend/src/globals.d.ts was not part of the output, so the generated tree did not type-check standalone and IDEs reported unresolved scss/md modules. Copy the shim into static/types/ as part of build:types so the emitted declarations resolve on their own. Refs MPT-23439. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used📓 Path-based instructions (1)**/*📄 CodeRabbit inference engine (AGENTS.md)
Files:
⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughChangesFrontend type build
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
|



🤖 AI-generated PR — Please review carefully.
What was done
The frontend type build (
npm run build:types,tsc -p tsconfig.build.jsonwithemitDeclarationOnly) emits.d.tsfiles intostatic/types/. TypeScript preserves side-effect imports such asimport './AddPlugShowcase.scss'in the emitted declarations, but the ambient module shimfrontend/src/globals.d.ts(declare module '*.scss'and the'*.md'declaration) was not part of the output. The generated tree therefore did not type-check standalone, and IDEs opening a generated.d.tsreported "Cannot find module './AddPlugShowcase.scss'".This change makes
build:typescopy the shim intostatic/types/after thetscemit, so the emitted declarations resolve on their own.Testing
make build scope=frontend— succeeds;static/types/globals.d.tsis now present in the output.static/types/tree inside the frontend container withskipLibCheck: false— no scss/md resolution errors. Negative control: removing the shim reproduceserror TS2882: Cannot find module or type declarations for side-effect import of '../../style.scss'.make check-all scope=frontend— checks pass, 8 test suites / 33 tests pass.Jira: https://softwareone.atlassian.net/browse/MPT-23439
Closes MPT-23439
build:typesto copyglobals.d.tsalongside emitted declarations..scssand.mdmodule imports.