Home / Function/ createDeprecatedFunction() — astro Function Reference

createDeprecatedFunction() — astro Function Reference

Architecture documentation for the createDeprecatedFunction() function in runtime.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  176f784d_56c8_5f12_c57d_7865a0f342c1["createDeprecatedFunction()"]
  73d13646_8e80_972f_3adc_f28448b64e4d["runtime.ts"]
  176f784d_56c8_5f12_c57d_7865a0f342c1 -->|defined in| 73d13646_8e80_972f_3adc_f28448b64e4d
  style 176f784d_56c8_5f12_c57d_7865a0f342c1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/runtime.ts lines 727–742

export function createDeprecatedFunction(functionName: string) {
	return (collection: string) => {
		const error = new AstroError({
			...AstroErrorData.GetEntryDeprecationError,
			message: AstroErrorData.GetEntryDeprecationError.message(collection, functionName),
		});

		// Remove the runtime module from the stack trace
		const stackLines = error.stack?.split('\n');
		if (stackLines && stackLines.length > 1) {
			stackLines.splice(1, 1);
			error.stack = stackLines.join('\n');
		}
		throw error;
	};
}

Subdomains

Frequently Asked Questions

What does createDeprecatedFunction() do?
createDeprecatedFunction() is a function in the astro codebase, defined in packages/astro/src/content/runtime.ts.
Where is createDeprecatedFunction() defined?
createDeprecatedFunction() is defined in packages/astro/src/content/runtime.ts at line 727.

Analyze Your Own Codebase

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

Try Supermodel Free