Home / Function/ print() — svelte Function Reference

print() — svelte Function Reference

Architecture documentation for the print() function in index.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  1257685a_8ccd_c2f0_be1c_4af0cda77d19["print()"]
  f0404eed_e134_3c7c_7b38_1cb13c71f197["index.js"]
  1257685a_8ccd_c2f0_be1c_4af0cda77d19 -->|defined in| f0404eed_e134_3c7c_7b38_1cb13c71f197
  style 1257685a_8ccd_c2f0_be1c_4af0cda77d19 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/print/index.js lines 20–33

export function print(ast, options = undefined) {
	return esrap.print(
		ast,
		/** @type {Visitors<AST.SvelteNode>} */ ({
			...ts({
				comments: ast.type === 'Root' ? ast.comments : [],
				getLeadingComments: options?.getLeadingComments,
				getTrailingComments: options?.getTrailingComments
			}),
			...svelte_visitors,
			...css_visitors
		})
	);
}

Domain

Subdomains

Frequently Asked Questions

What does print() do?
print() is a function in the svelte codebase, defined in packages/svelte/src/compiler/print/index.js.
Where is print() defined?
print() is defined in packages/svelte/src/compiler/print/index.js at line 20.

Analyze Your Own Codebase

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

Try Supermodel Free