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

This commit is contained in:
Eric Liu 2021-02-06 14:10:18 -08:00
commit a56c954af0
161 changed files with 6379 additions and 6362 deletions

View file

@ -1,4 +1,5 @@
/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
import { CopyProps } from "../Copy/Copy";
export interface CopyButtonProps extends CopyProps {
@ -9,11 +10,11 @@ export interface CopyButtonProps extends CopyProps {
iconDescription?: string;
}
export default class CopyButton {
$$prop_def: CopyButtonProps;
$$slot_def: {};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
$on(eventname: "animationend", cb: (event: WindowEventMap["animationend"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}
export default class CopyButton extends SvelteComponentTyped<
CopyButtonProps,
{
click: WindowEventMap["click"];
animationend: WindowEventMap["animationend"];
},
{}
> {}