Home / File/ sync.ts — astro Source File

sync.ts — astro Source File

Architecture documentation for sync.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.

File typescript CoreAstro RenderingEngine 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  ebfe6538_5169_4fca_0d49_927e3c018214["sync.ts"]
  e9b74c5a_8d34_34a7_e196_5e41b87214aa["../types/astro.js"]
  ebfe6538_5169_4fca_0d49_927e3c018214 --> e9b74c5a_8d34_34a7_e196_5e41b87214aa
  a2fc192c_cdf9_df62_81bf_9c18a80b317e["./fonts/constants.js"]
  ebfe6538_5169_4fca_0d49_927e3c018214 --> a2fc192c_cdf9_df62_81bf_9c18a80b317e
  style ebfe6538_5169_4fca_0d49_927e3c018214 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { AstroSettings } from '../../types/astro.js';
import { FONTS_TYPES_FILE } from './constants.js';

export function syncFonts(settings: AstroSettings): void {
	if (!settings.config.fonts) {
		return;
	}

	settings.injectedTypes.push({
		filename: FONTS_TYPES_FILE,
		content: `declare module 'astro:assets' {
	/** @internal */
	export type CssVariable = (${JSON.stringify(settings.config.fonts.map((family) => family.cssVariable))})[number];
}
`,
	});
}

Domain

Subdomains

Functions

Dependencies

  • ../types/astro.js
  • ./fonts/constants.js

Frequently Asked Questions

What does sync.ts do?
sync.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 sync.ts?
sync.ts defines 1 function(s): syncFonts.
What does sync.ts depend on?
sync.ts imports 2 module(s): ../types/astro.js, ./fonts/constants.js.
Where is sync.ts in the architecture?
sync.ts is located at packages/astro/src/assets/fonts/sync.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/assets/fonts).

Analyze Your Own Codebase

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

Try Supermodel Free