mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(types): use the SvelteComponentTyped interface in the TypeScript definitions (#515)
This commit is contained in:
parent
4e4234f83d
commit
bcd28de86e
161 changed files with 6379 additions and 6362 deletions
33
types/Search/Search.d.ts
vendored
33
types/Search/Search.d.ts
vendored
|
@ -1,4 +1,5 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface SearchProps {
|
||||
/**
|
||||
|
@ -85,19 +86,19 @@ export interface SearchProps {
|
|||
ref?: null | HTMLInputElement;
|
||||
}
|
||||
|
||||
export default class Search {
|
||||
$$prop_def: SearchProps;
|
||||
$$slot_def: {};
|
||||
|
||||
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
||||
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
|
||||
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
|
||||
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
|
||||
$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: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
|
||||
$on(eventname: "clear", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
||||
export default class Search extends SvelteComponentTyped<
|
||||
SearchProps,
|
||||
{
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
change: WindowEventMap["change"];
|
||||
input: WindowEventMap["input"];
|
||||
focus: WindowEventMap["focus"];
|
||||
blur: WindowEventMap["blur"];
|
||||
keydown: WindowEventMap["keydown"];
|
||||
clear: CustomEvent<any>;
|
||||
},
|
||||
{}
|
||||
> {}
|
||||
|
|
24
types/Search/SearchSkeleton.d.ts
vendored
24
types/Search/SearchSkeleton.d.ts
vendored
|
@ -1,6 +1,8 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface SearchSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
export interface SearchSkeletonProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
|
@ -13,13 +15,13 @@ export interface SearchSkeletonProps extends svelte.JSX.HTMLAttributes<HTMLEleme
|
|||
size?: "sm" | "lg" | "xl";
|
||||
}
|
||||
|
||||
export default class SearchSkeleton {
|
||||
$$prop_def: SearchSkeletonProps;
|
||||
$$slot_def: {};
|
||||
|
||||
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
||||
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
|
||||
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
|
||||
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
|
||||
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||
}
|
||||
export default class SearchSkeleton extends SvelteComponentTyped<
|
||||
SearchSkeletonProps,
|
||||
{
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
},
|
||||
{}
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue