Home / File/ head-and-content.ts — astro Source File

head-and-content.ts — astro Source File

Architecture documentation for head-and-content.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.

File typescript CoreAstro RenderingEngine 1 imports 3 functions

Entity Profile

Dependency Diagram

graph LR
  b955b9a3_eb7b_2879_6051_9e4a371d44c3["head-and-content.ts"]
  02a6e2b4_7619_f2ac_ef3f_25cd47b88fe5["./astro/render-template.js"]
  b955b9a3_eb7b_2879_6051_9e4a371d44c3 --> 02a6e2b4_7619_f2ac_ef3f_25cd47b88fe5
  style b955b9a3_eb7b_2879_6051_9e4a371d44c3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { RenderTemplateResult } from './render-template.js';

const headAndContentSym = Symbol.for('astro.headAndContent');

export type HeadAndContent = {
	[headAndContentSym]: true;
	head: string;
	content: RenderTemplateResult;
};

/**
 * A head that doesn't contain any content
 */
export type ThinHead = {
	[headAndContentSym]: true;
};

export function isHeadAndContent(obj: unknown): obj is HeadAndContent {
	return typeof obj === 'object' && obj !== null && !!(obj as any)[headAndContentSym];
}

export function createHeadAndContent(head: string, content: RenderTemplateResult): HeadAndContent {
	return {
		[headAndContentSym]: true,
		head,
		content,
	};
}

export function createThinHead(): ThinHead {
	return {
		[headAndContentSym]: true,
	};
}

Domain

Subdomains

Dependencies

  • ./astro/render-template.js

Frequently Asked Questions

What does head-and-content.ts do?
head-and-content.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in head-and-content.ts?
head-and-content.ts defines 3 function(s): createHeadAndContent, createThinHead, isHeadAndContent.
What does head-and-content.ts depend on?
head-and-content.ts imports 1 module(s): ./astro/render-template.js.
Where is head-and-content.ts in the architecture?
head-and-content.ts is located at packages/astro/src/runtime/server/render/astro/head-and-content.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/runtime/server/render/astro).

Analyze Your Own Codebase

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

Try Supermodel Free