generalEnhancements() — astro Function Reference
Architecture documentation for the generalEnhancements() function in diagnostics.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 1d5a685e_2179_1b72_bb2f_34e08ffe409c["generalEnhancements()"] eb2f7d36_9d97_e74c_0d2e_fc25c2af688f["diagnostics.ts"] 1d5a685e_2179_1b72_bb2f_34e08ffe409c -->|defined in| eb2f7d36_9d97_e74c_0d2e_fc25c2af688f be35e5e8_d2ee_ceca_8e9a_5da51e32a48d["enhancedProvideSemanticDiagnostics()"] be35e5e8_d2ee_ceca_8e9a_5da51e32a48d -->|calls| 1d5a685e_2179_1b72_bb2f_34e08ffe409c style 1d5a685e_2179_1b72_bb2f_34e08ffe409c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/language-tools/language-server/src/plugins/typescript/diagnostics.ts lines 36–48
function generalEnhancements(diagnostic: Diagnostic) {
if (
diagnostic.code === DiagnosticCodes.CANNOT_FIND_MODULE &&
diagnostic.message.includes('astro:content')
) {
diagnostic.message +=
"\n\nIf you're using content collections, make sure to run `astro dev`, `astro build` or `astro sync` to first generate the types so you can import from them. If you already ran one of those commands, restarting the language server might be necessary in order for the change to take effect.";
return diagnostic;
}
return diagnostic;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does generalEnhancements() do?
generalEnhancements() is a function in the astro codebase, defined in packages/language-tools/language-server/src/plugins/typescript/diagnostics.ts.
Where is generalEnhancements() defined?
generalEnhancements() is defined in packages/language-tools/language-server/src/plugins/typescript/diagnostics.ts at line 36.
What calls generalEnhancements()?
generalEnhancements() is called by 1 function(s): enhancedProvideSemanticDiagnostics.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free