Home / Type/ SvelteOptions Type — svelte Architecture

SvelteOptions Type — svelte Architecture

Architecture documentation for the SvelteOptions type/interface in template.d.ts from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  ca89b5ed_3f23_2608_bc75_d24ecdb90551["SvelteOptions"]
  628b0d7d_f8bd_9570_9133_f9b9af4f58aa["template.d.ts"]
  ca89b5ed_3f23_2608_bc75_d24ecdb90551 -->|defined in| 628b0d7d_f8bd_9570_9133_f9b9af4f58aa
  style ca89b5ed_3f23_2608_bc75_d24ecdb90551 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/types/template.d.ts lines 77–108

	export interface SvelteOptions {
		// start/end info (needed for warnings and for our Prettier plugin)
		start: number;
		end: number;
		// options
		runes?: boolean;
		immutable?: boolean;
		accessors?: boolean;
		preserveWhitespace?: boolean;
		namespace?: Namespace;
		css?: 'injected';
		customElement?: {
			tag?: string;
			shadow?: 'open' | 'none' | ObjectExpression | undefined;
			props?: Record<
				string,
				{
					attribute?: string;
					reflect?: boolean;
					type?: 'Array' | 'Boolean' | 'Number' | 'Object' | 'String';
				}
			>;
			/**
			 * Is of type
			 * ```ts
			 * (ceClass: new () => HTMLElement) => new () => HTMLElement
			 * ```
			 */
			extend?: ArrowFunctionExpression | Identifier;
		};
		attributes: Attribute[];
	}

Frequently Asked Questions

What is the SvelteOptions type?
SvelteOptions is a type/interface in the svelte codebase, defined in packages/svelte/src/compiler/types/template.d.ts.
Where is SvelteOptions defined?
SvelteOptions is defined in packages/svelte/src/compiler/types/template.d.ts at line 77.

Analyze Your Own Codebase

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

Try Supermodel Free