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
17
types/CopyButton/CopyButton.d.ts
vendored
17
types/CopyButton/CopyButton.d.ts
vendored
|
@ -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"];
|
||||
},
|
||||
{}
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue