Home / File/ ambient.d.ts — svelte Source File

ambient.d.ts — svelte Source File

Architecture documentation for ambient.d.ts, a typescript file in the svelte codebase. 2 imports, 0 dependents.

File typescript SharedInternal DOMUtils 2 imports 8 classes

Entity Profile

Dependency Diagram

graph LR
  985bc98d_94de_5b58_d2b1_10dec5f6f44c["ambient.d.ts"]
  4ead6623_c53e_ab40_5690_64903d5addf1["svelte"]
  985bc98d_94de_5b58_d2b1_10dec5f6f44c --> 4ead6623_c53e_ab40_5690_64903d5addf1
  0089bc1e_86a8_7436_5025_0d4d65a18542["legacy"]
  985bc98d_94de_5b58_d2b1_10dec5f6f44c --> 0089bc1e_86a8_7436_5025_0d4d65a18542
  style 985bc98d_94de_5b58_d2b1_10dec5f6f44c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

declare module '*.svelte' {
	// use prettier-ignore for a while because of https://github.com/sveltejs/language-tools/commit/026111228b5814a9109cc4d779d37fb02955fb8b
	// prettier-ignore
	import { SvelteComponent } from 'svelte'
	import { LegacyComponentType } from 'svelte/legacy';
	const Comp: LegacyComponentType;
	type Comp = SvelteComponent;
	export default Comp;
}

/**
 * Declares reactive state.
 *
 * Example:
 * ```ts
 * let count = $state(0);
 * ```
 *
 * @see {@link https://svelte.dev/docs/svelte/$state Documentation}
 *
 * @param initial The initial value
 */
declare function $state<T>(initial: T): T;
declare function $state<T>(): T | undefined;

declare namespace $state {
	type Primitive = string | number | boolean | null | undefined;

	type TypedArray =
		| Int8Array
		| Uint8Array
		| Uint8ClampedArray
		| Int16Array
		| Uint16Array
		| Int32Array
		| Uint32Array
		| Float32Array
		| Float64Array
		| BigInt64Array
		| BigUint64Array;

	/** The things that `structuredClone` can handle — https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm */
	export type Cloneable =
		| ArrayBuffer
		| DataView
		| Date
		| Error
		| Map<any, any>
		| RegExp
		| Set<any>
		| TypedArray
		// web APIs
		| Blob
		| CryptoKey
		| DOMException
		| DOMMatrix
		| DOMMatrixReadOnly
		| DOMPoint
		| DOMPointReadOnly
		| DOMQuad
// ... (494 more lines)

Subdomains

Dependencies

  • legacy
  • svelte

Frequently Asked Questions

What does ambient.d.ts do?
ambient.d.ts is a source file in the svelte codebase, written in typescript. It belongs to the SharedInternal domain, DOMUtils subdomain.
What does ambient.d.ts depend on?
ambient.d.ts imports 2 module(s): legacy, svelte.
Where is ambient.d.ts in the architecture?
ambient.d.ts is located at packages/svelte/src/ambient.d.ts (domain: SharedInternal, subdomain: DOMUtils, directory: packages/svelte/src).

Analyze Your Own Codebase

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

Try Supermodel Free