feat(types): use the SvelteComponentTyped interface in the TypeScript definitions (#515)

This commit is contained in:
Eric Liu 2021-02-07 11:25:20 -08:00 committed by GitHub
commit bcd28de86e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
161 changed files with 6379 additions and 6362 deletions

View file

@ -1,6 +1,8 @@
/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface SelectProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
export interface SelectProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* Specify the selected item value
*/
@ -83,13 +85,8 @@ export interface SelectProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNam
ref?: null | HTMLSelectElement;
}
export default class Select {
$$prop_def: SelectProps;
$$slot_def: {
default: {};
};
$on(eventname: "change", cb: (event: CustomEvent<string>) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}
export default class Select extends SvelteComponentTyped<
SelectProps,
{ change: CustomEvent<string>; blur: WindowEventMap["blur"] },
{ default: {} }
> {}