index.d.ts — svelte Source File
Architecture documentation for index.d.ts, a typescript file in the svelte codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d5f75cc7_4dc4_5b53_55c5_43ee635d6602["index.d.ts"] 765560a1_1b3b_9cb2_cc8e_737486d0887f["./ambient.js"] d5f75cc7_4dc4_5b53_55c5_43ee635d6602 --> 765560a1_1b3b_9cb2_cc8e_737486d0887f style d5f75cc7_4dc4_5b53_55c5_43ee635d6602 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// This should contain all the public interfaces (not all of them are actually importable, check current Svelte for which ones are).
import './ambient.js';
/**
* @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions.
* Use `mount` instead to instantiate components.
* See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes)
* for more info.
*/
export interface ComponentConstructorOptions<
Props extends Record<string, any> = Record<string, any>
> {
target: Element | Document | ShadowRoot;
anchor?: Element;
props?: Props;
context?: Map<any, any>;
hydrate?: boolean;
intro?: boolean;
recover?: boolean;
sync?: boolean;
idPrefix?: string;
$$inline?: boolean;
}
/**
* Utility type for ensuring backwards compatibility on a type level that if there's a default slot, add 'children' to the props
*/
type Properties<Props, Slots> = Props &
(Slots extends { default: any }
? // This is unfortunate because it means "accepts no props" turns into "accepts any prop"
// but the alternative is non-fixable type errors because of the way TypeScript index
// signatures work (they will always take precedence and make an impossible-to-satisfy children type).
Props extends Record<string, never>
? any
: { children?: any }
: {});
/**
* This was the base class for Svelte components in Svelte 4. Svelte 5+ components
* are completely different under the hood. For typing, use `Component` instead.
* To instantiate components, use `mount` instead.
* See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info.
*/
export class SvelteComponent<
Props extends Record<string, any> = Record<string, any>,
Events extends Record<string, any> = any,
Slots extends Record<string, any> = any
> {
/** The custom element version of the component. Only present if compiled with the `customElement` compiler option */
static element?: typeof HTMLElement;
[prop: string]: any;
/**
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
* is a stop-gap solution. Migrate towards using `mount` instead. See
* [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info.
*/
constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>);
/**
// ... (312 more lines)
Domain
Subdomains
Functions
Types
Dependencies
- ./ambient.js
Source
Frequently Asked Questions
What does index.d.ts do?
index.d.ts is a source file in the svelte codebase, written in typescript. It belongs to the SharedInternal domain, DOMUtils subdomain.
What functions are defined in index.d.ts?
index.d.ts defines 1 function(s): e.
What does index.d.ts depend on?
index.d.ts imports 1 module(s): ./ambient.js.
Where is index.d.ts in the architecture?
index.d.ts is located at packages/svelte/src/index.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