Home / Function/ hasClientOnlyDirective() — astro Function Reference

hasClientOnlyDirective() — astro Function Reference

Architecture documentation for the hasClientOnlyDirective() function in rehype.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  6969d9a3_74d2_c053_67bd_9a8d8bb78253["hasClientOnlyDirective()"]
  89da4403_ab4a_62fa_64f0_d53bd0b3aee8["rehype.ts"]
  6969d9a3_74d2_c053_67bd_9a8d8bb78253 -->|defined in| 89da4403_ab4a_62fa_64f0_d53bd0b3aee8
  d17ed63a_5ec6_bc29_96d7_b3145cec7d5d["rehypeAnalyzeAstroMetadata()"]
  d17ed63a_5ec6_bc29_96d7_b3145cec7d5d -->|calls| 6969d9a3_74d2_c053_67bd_9a8d8bb78253
  style 6969d9a3_74d2_c053_67bd_9a8d8bb78253 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/jsx/rehype.ts lines 196–200

function hasClientOnlyDirective(node: MdxJsxFlowElementHast | MdxJsxTextElementHast) {
	return node.attributes.some(
		(attr) => attr.type === 'mdxJsxAttribute' && attr.name === 'client:only',
	);
}

Domain

Subdomains

Frequently Asked Questions

What does hasClientOnlyDirective() do?
hasClientOnlyDirective() is a function in the astro codebase, defined in packages/astro/src/jsx/rehype.ts.
Where is hasClientOnlyDirective() defined?
hasClientOnlyDirective() is defined in packages/astro/src/jsx/rehype.ts at line 196.
What calls hasClientOnlyDirective()?
hasClientOnlyDirective() is called by 1 function(s): rehypeAnalyzeAstroMetadata.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free