@svelkit/delay
Version:
> a delay component for [svelte] (part of [svelkit])
99 lines (86 loc) • 3.06 kB
TypeScript
declare class Svelte2TsxComponent<
Props extends {} = {},
Events extends {} = {},
Slots extends {} = {}
> {
context: JSX.Component["context"];
setState: JSX.Component["setState"];
render: JSX.Component["render"];
forceUpdate: JSX.Component["forceUpdate"];
props: JSX.Component["props"];
state: JSX.Component["state"];
refs: JSX.Component["refs"];
// svelte2tsx-specific
/**
* @internal This is for type checking capabilities only
* and does not exist at runtime. Don't use this property.
*/
$$prop_def: Props;
/**
* @internal This is for type checking capabilities only
* and does not exist at runtime. Don't use this property.
*/
$$events_def: Events;
/**
* @internal This is for type checking capabilities only
* and does not exist at runtime. Don't use this property.
*/
$$slot_def: Slots;
// https://svelte.dev/docs#Client-side_component_API
constructor(options: {
/**
* An HTMLElement to render to. This option is required.
*/
target: Element;
/**
* A child of `target` to render the component immediately before.
*/
anchor?: Element;
/**
* An object of properties to supply to the component.
*/
props?: Props;
hydrate?: boolean;
intro?: boolean;
$$inline?: boolean;
});
/**
* 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.
*/
$on<K extends keyof Events>(event: K, handler: (e: Events[K]) => any): () => void;
/**
* Removes a component from the DOM and triggers any `onDestroy` handlers.
*/
$destroy(): 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.
*/
$set(props: Partial<Props>): void;
// From SvelteComponent(Dev) definition
$$: any;
$capture_state(): void;
$inject_state(): void;
}
type AConstructorTypeOf<T> = new (...args: any[]) => T;
declare const Delay__SvelteComponent__base: AConstructorTypeOf<Svelte2TsxComponent<Partial<{
/**
* The slot is shown when `show` becomes truthy. Default: `true`
*
* Additionally this is used as a key for the delay. A different `show` value resets the timeout.
*/ show?: unknown;
/**
* minimum delay in msecs for showing the loading slot. Default: `200`
*/ ms?: number | undefined;
}>, {
[evt: string]: CustomEvent<any>;
}, {
default: {};
}>>;
declare class Delay__SvelteComponent_ extends Delay__SvelteComponent__base {
}//# sourceMappingURL=delay.svelte.d.ts.map
//# sourceMappingURL=index.d.ts.map
export default Delay__SvelteComponent_;
//# sourceMappingURL=delay.d.ts.map