Home / Function/ normalizeInjectedTypeFilename() — astro Function Reference

normalizeInjectedTypeFilename() — astro Function Reference

Architecture documentation for the normalizeInjectedTypeFilename() function in hooks.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  1443f867_b3af_7eca_2ca8_c993c323ecbd["normalizeInjectedTypeFilename()"]
  19f4084c_157f_a15d_f001_5d8088b75dee["hooks.ts"]
  1443f867_b3af_7eca_2ca8_c993c323ecbd -->|defined in| 19f4084c_157f_a15d_f001_5d8088b75dee
  75e8c00d_96e6_cdbc_dc65_9834f84707d0["runHookConfigDone()"]
  75e8c00d_96e6_cdbc_dc65_9834f84707d0 -->|calls| 1443f867_b3af_7eca_2ca8_c993c323ecbd
  2873f6b6_8222_203b_2706_97a1fe360c5a["normalizeCodegenDir()"]
  1443f867_b3af_7eca_2ca8_c993c323ecbd -->|calls| 2873f6b6_8222_203b_2706_97a1fe360c5a
  style 1443f867_b3af_7eca_2ca8_c993c323ecbd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/integrations/hooks.ts lines 158–165

export function normalizeInjectedTypeFilename(filename: string, integrationName: string): string {
	if (!filename.endsWith('.d.ts')) {
		throw new Error(
			`Integration ${colors.bold(integrationName)} is injecting a type that does not end with "${colors.bold('.d.ts')}"`,
		);
	}
	return `${normalizeCodegenDir(integrationName)}${filename.replace(SAFE_CHARS_RE, '_')}`;
}

Domain

Subdomains

Frequently Asked Questions

What does normalizeInjectedTypeFilename() do?
normalizeInjectedTypeFilename() is a function in the astro codebase, defined in packages/astro/src/integrations/hooks.ts.
Where is normalizeInjectedTypeFilename() defined?
normalizeInjectedTypeFilename() is defined in packages/astro/src/integrations/hooks.ts at line 158.
What does normalizeInjectedTypeFilename() call?
normalizeInjectedTypeFilename() calls 1 function(s): normalizeCodegenDir.
What calls normalizeInjectedTypeFilename()?
normalizeInjectedTypeFilename() is called by 1 function(s): runHookConfigDone.

Analyze Your Own Codebase

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

Try Supermodel Free