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,4 +1,5 @@
/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface ToolbarSearchProps {
/**
@ -38,13 +39,13 @@ export interface ToolbarSearchProps {
ref?: null | HTMLInputElement;
}
export default class ToolbarSearch {
$$prop_def: ToolbarSearchProps;
$$slot_def: {};
$on(eventname: "change", cb: (event: WindowEventMap["change"]) => void): () => void;
$on(eventname: "input", cb: (event: WindowEventMap["input"]) => void): () => void;
$on(eventname: "focus", cb: (event: WindowEventMap["focus"]) => void): () => void;
$on(eventname: "blur", cb: (event: WindowEventMap["blur"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}
export default class ToolbarSearch extends SvelteComponentTyped<
ToolbarSearchProps,
{
change: WindowEventMap["change"];
input: WindowEventMap["input"];
focus: WindowEventMap["focus"];
blur: WindowEventMap["blur"];
},
{}
> {}