check() — astro Function Reference
Architecture documentation for the check() function in server.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 6ff5edc4_5d05_1226_e52f_11caa2bf1b99["check()"] 90e6a33a_3784_88f7_7685_7a18e74859af["server.ts"] 6ff5edc4_5d05_1226_e52f_11caa2bf1b99 -->|defined in| 90e6a33a_3784_88f7_7685_7a18e74859af 24b356be_bc1d_0fc2_c36f_ba2b6ccf6012["slotName()"] 6ff5edc4_5d05_1226_e52f_11caa2bf1b99 -->|calls| 24b356be_bc1d_0fc2_c36f_ba2b6ccf6012 9acfa750_02ca_2497_63b9_04250ba1be73["throwEnhancedErrorIfMdxComponent()"] 6ff5edc4_5d05_1226_e52f_11caa2bf1b99 -->|calls| 9acfa750_02ca_2497_63b9_04250ba1be73 style 6ff5edc4_5d05_1226_e52f_11caa2bf1b99 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/mdx/src/server.ts lines 10–28
export async function check(
Component: any,
props: any,
{ default: children = null, ...slotted } = {},
) {
if (typeof Component !== 'function') return false;
const slots: Record<string, any> = {};
for (const [key, value] of Object.entries(slotted)) {
const name = slotName(key);
slots[name] = value;
}
try {
const result = await Component({ ...props, ...slots, children });
return result[AstroJSX];
} catch (e) {
throwEnhancedErrorIfMdxComponent(e as Error, Component);
}
return false;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does check() do?
check() is a function in the astro codebase, defined in packages/integrations/mdx/src/server.ts.
Where is check() defined?
check() is defined in packages/integrations/mdx/src/server.ts at line 10.
What does check() call?
check() calls 2 function(s): slotName, throwEnhancedErrorIfMdxComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free