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

17
types/Grid/Row.d.ts vendored
View file

@ -1,6 +1,8 @@
/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface RowProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
export interface RowProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* Set to `true` to render a custom HTML element
* Props are destructured as `props` in the default slot (e.g., <Row let:props><section {...props}>...</section></Row>)
@ -45,11 +47,8 @@ export interface RowProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMa
padding?: boolean;
}
export default class Row {
$$prop_def: RowProps;
$$slot_def: {
default: { props: { class: string; [key: string]: any } };
};
$on(eventname: string, cb: (event: Event) => void): () => void;
}
export default class Row extends SvelteComponentTyped<
RowProps,
{},
{ default: { props: { class: string; [key: string]: any } } }
> {}