Home / Function/ onlyDirective() — astro Function Reference

onlyDirective() — astro Function Reference

Architecture documentation for the onlyDirective() function in only.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  9d74332f_97de_ac72_184c_39ab7e767f6f["onlyDirective()"]
  a49919f4_103c_714c_643c_e6e133e8fbcd["only.ts"]
  9d74332f_97de_ac72_184c_39ab7e767f6f -->|defined in| a49919f4_103c_714c_643c_e6e133e8fbcd
  style 9d74332f_97de_ac72_184c_39ab7e767f6f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/client/only.ts lines 6–9

const onlyDirective: ClientDirective = async (load) => {
	const hydrate = await load();
	await hydrate();
};

Domain

Subdomains

Frequently Asked Questions

What does onlyDirective() do?
onlyDirective() is a function in the astro codebase, defined in packages/astro/src/runtime/client/only.ts.
Where is onlyDirective() defined?
onlyDirective() is defined in packages/astro/src/runtime/client/only.ts at line 6.

Analyze Your Own Codebase

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

Try Supermodel Free