Home / Function/ extractAnnotations() — astro Function Reference

extractAnnotations() — astro Function Reference

Architecture documentation for the extractAnnotations() function in annotations.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  73ce906b_ea4e_2e7e_2aca_abd6c2839c11["extractAnnotations()"]
  eb086609_d938_1942_db3c_3600aafd5b4c["annotations.ts"]
  73ce906b_ea4e_2e7e_2aca_abd6c2839c11 -->|defined in| eb086609_d938_1942_db3c_3600aafd5b4c
  45b73c71_f508_db32_3719_64b0d0c0f353["processAnnotations()"]
  45b73c71_f508_db32_3719_64b0d0c0f353 -->|calls| 73ce906b_ea4e_2e7e_2aca_abd6c2839c11
  style 73ce906b_ea4e_2e7e_2aca_abd6c2839c11 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/client/dev-toolbar/apps/audit/annotations.ts lines 14–23

function extractAnnotations(element: Element) {
	const annotations: Annotation = {} as any;
	for (const [attr, key] of Object.entries(ANNOTATION_MAP) as [string, keyof Annotation][]) {
		annotations[key] = element.getAttribute(attr)!;
	}
	for (const attr of Object.keys(ANNOTATION_MAP)) {
		element.removeAttribute(attr);
	}
	return annotations;
}

Domain

Subdomains

Frequently Asked Questions

What does extractAnnotations() do?
extractAnnotations() is a function in the astro codebase, defined in packages/astro/src/runtime/client/dev-toolbar/apps/audit/annotations.ts.
Where is extractAnnotations() defined?
extractAnnotations() is defined in packages/astro/src/runtime/client/dev-toolbar/apps/audit/annotations.ts at line 14.
What calls extractAnnotations()?
extractAnnotations() is called by 1 function(s): processAnnotations.

Analyze Your Own Codebase

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

Try Supermodel Free