test: add TS types

This commit is contained in:
Eric Liu 2020-11-19 14:16:01 -08:00
commit eed617433b
126 changed files with 3378 additions and 226 deletions

View file

@ -9,7 +9,7 @@ interface ColumnSizeDescriptor {
type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor;
export interface ColumnProps {
export interface ColumnProps 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. <Column let:props><article {...props}>...</article></Column>)
@ -69,7 +69,7 @@ export interface ColumnProps {
export default class Column {
$$prop_def: ColumnProps;
$$slot_def: {
default: { props?: { class: string } };
default: { props: { class: string; [key: string]: any } };
};
$on(eventname: string, cb: (event: Event) => void): () => void;

View file

@ -1,6 +1,6 @@
/// <reference types="svelte" />
export interface GridProps {
export interface GridProps 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. <Grid let:props><header {...props}>...</header></Grid>)
@ -48,7 +48,7 @@ export interface GridProps {
export default class Grid {
$$prop_def: GridProps;
$$slot_def: {
default: { props?: { class: string } };
default: { props: { class: string; [key: string]: any } };
};
$on(eventname: string, cb: (event: Event) => void): () => void;

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

@ -1,6 +1,6 @@
/// <reference types="svelte" />
export interface RowProps {
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>)
@ -42,7 +42,7 @@ export interface RowProps {
export default class Row {
$$prop_def: RowProps;
$$slot_def: {
default: { props?: { class: string; [key: string]: any } };
default: { props: { class: string; [key: string]: any } };
};
$on(eventname: string, cb: (event: Event) => void): () => void;