Home / Class/ astroHTML Class — astro Architecture

astroHTML Class — astro Architecture

Architecture documentation for the astroHTML class in astro-jsx.d.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  f484fd2d_1696_4fb2_521f_4723a8999e86["astroHTML"]
  a6b1e08e_2697_036f_1969_86462fc5f61d["astro-jsx.d.ts"]
  f484fd2d_1696_4fb2_521f_4723a8999e86 -->|defined in| a6b1e08e_2697_036f_1969_86462fc5f61d

Relationship Graph

Source Code

packages/language-tools/language-server/types/astro-jsx.d.ts lines 12–1497

declare namespace astroHTML.JSX {
	export type Child = Node | Node[] | string | number | boolean | null | undefined | unknown;
	export type Children = Child | Child[];

	interface ElementChildrenAttribute {
		// eslint-disable-next-line @typescript-eslint/no-empty-object-type
		children: {};
	}

	interface IntrinsicAttributes extends AstroBuiltinProps, AstroBuiltinAttributes {
		slot?: string;
		children?: Children;
	}

	interface AstroBuiltinProps {
		'client:load'?: boolean;
		'client:idle'?: boolean;
		'client:media'?: string;
		'client:visible'?: boolean;
		'client:only'?: boolean | string;
	}

	interface AstroBuiltinAttributes {
		'class:list'?:
			| Record<string, boolean>
			| Record<any, any>
			| Iterable<string>
			| Iterable<any>
			| string;
		'set:html'?: any;
		'set:text'?: any;
		'is:raw'?: boolean;
	}

	interface AstroDefineVarsAttribute {
		'define:vars'?: any;
	}

	interface AstroStyleAttributes extends AstroDefineVarsAttribute {
		/** @deprecated Use `is:global` instead */
		global?: boolean;
		'is:global'?: boolean;
		'is:inline'?: boolean;
	}

	interface AstroScriptAttributes extends AstroDefineVarsAttribute {
		/** @deprecated Hoist is now the default behavior */
		hoist?: boolean;
		'is:inline'?: boolean;
	}

	// This is an unfortunate use of `any`, but unfortunately we can't make a type that works for every framework
	// without importing every single framework's types (which comes with its own set of problems).
	// Using any isn't that bad here however as in Astro files the return type of a component isn't relevant in most cases
	type Element = HTMLElement | any;

	interface DOMAttributes {
		children?: Children;

		// Clipboard Events
		oncopy?: string | undefined | null;
		oncut?: string | undefined | null;
		onpaste?: string | undefined | null;

		// Composition Events
		oncompositionend?: string | undefined | null;
		oncompositionstart?: string | undefined | null;
		oncompositionupdate?: string | undefined | null;

		// Focus Events
		onfocus?: string | undefined | null;
		onfocusin?: string | undefined | null;
		onfocusout?: string | undefined | null;
		onblur?: string | undefined | null;

		// Form Events
		onchange?: string | undefined | null;
		oninput?: string | undefined | null;
		onreset?: string | undefined | null;
		onsubmit?: string | undefined | null;
		oninvalid?: string | undefined | null;

Frequently Asked Questions

What is the astroHTML class?
astroHTML is a class in the astro codebase, defined in packages/language-tools/language-server/types/astro-jsx.d.ts.
Where is astroHTML defined?
astroHTML is defined in packages/language-tools/language-server/types/astro-jsx.d.ts at line 12.

Analyze Your Own Codebase

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

Try Supermodel Free