refactor(types): use typed SvelteComponent interface for typing components

This commit is contained in:
Eric Liu 2020-11-25 15:29:55 -08:00
commit dab82d3479
156 changed files with 1379 additions and 1667 deletions

16
types/Copy/Copy.d.ts vendored
View file

@ -1,4 +1,5 @@
/// <reference types="svelte" />
import { SvelteComponent } from "svelte";
export interface CopyProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> {
/**
@ -20,13 +21,8 @@ export interface CopyProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameM
ref?: null | HTMLButtonElement;
}
export default class Copy {
$$prop_def: CopyProps;
$$slot_def: {
default: {};
};
$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 Copy extends SvelteComponent<
CopyProps,
{ click: WindowEventMap["click"]; animationend: WindowEventMap["animationend"] },
{ default: {} }
> {}