Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/snel/core/internals/types.d.ts>Svelte2TsxComponent

A Cybernetical framework for svelte applications in deno
Latest
class Svelte2TsxComponent
import { Svelte2TsxComponent } from "https://deno.land/x/snel@v0.7.1/core/internals/types.d.ts";

Constructors

new
Svelte2TsxComponent(options: Svelte2TsxComponentConstructorParameters<Props>)

Type Parameters

optional
Props extends { } = { }
optional
Events extends { } = { }
optional
Slots extends { } = { }

Properties

$$: any
$$events_def: Events
$$prop_def: Props
$$slot_def: Slots

Methods

$destroy(): void

Removes a component from the DOM and triggers any onDestroy handlers.

$on<K extends keyof Events & string>(event: K, handler: (e: Events[K]) => any): () => void

Causes the callback function to be called whenever the component dispatches an event. A function is returned that will remove the event listener when called.

$set(props?: Partial<Props>): void

Programmatically sets props on an instance. component.$set({ x: 1 }) is equivalent to x = 1 inside the component's <script> block. Calling this method schedules an update for the next microtask — the DOM is not updated synchronously.