mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
fix(types): improve e.detail
type for dispatched events (#1907)
* fix(types): improve `e.detail` type for dispatched events * Run "yarn build:docs" * test: assert new types
This commit is contained in:
parent
f1cafd4959
commit
6590457574
13 changed files with 70 additions and 35 deletions
2
types/ListBox/ListBoxSelection.svelte.d.ts
vendored
2
types/ListBox/ListBoxSelection.svelte.d.ts
vendored
|
@ -35,7 +35,7 @@ export interface ListBoxSelectionProps extends RestProps {
|
|||
|
||||
export default class ListBoxSelection extends SvelteComponentTyped<
|
||||
ListBoxSelectionProps,
|
||||
{ clear: CustomEvent<any> },
|
||||
{ clear: CustomEvent<KeyboardEvent | MouseEvent> },
|
||||
{}
|
||||
> {
|
||||
/**
|
||||
|
|
2
types/Slider/Slider.svelte.d.ts
vendored
2
types/Slider/Slider.svelte.d.ts
vendored
|
@ -126,11 +126,11 @@ export interface SliderProps extends RestProps {
|
|||
export default class Slider extends SvelteComponentTyped<
|
||||
SliderProps,
|
||||
{
|
||||
change: CustomEvent<number>;
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
change: CustomEvent<any>;
|
||||
},
|
||||
{ labelText: {} }
|
||||
> {}
|
||||
|
|
|
@ -34,11 +34,11 @@ export interface StructuredListProps extends RestProps {
|
|||
export default class StructuredList extends SvelteComponentTyped<
|
||||
StructuredListProps,
|
||||
{
|
||||
change: CustomEvent<string>;
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
change: CustomEvent<any>;
|
||||
},
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
2
types/Tabs/Tabs.svelte.d.ts
vendored
2
types/Tabs/Tabs.svelte.d.ts
vendored
|
@ -40,9 +40,9 @@ export interface TabsProps extends RestProps {
|
|||
export default class Tabs extends SvelteComponentTyped<
|
||||
TabsProps,
|
||||
{
|
||||
change: CustomEvent<number>;
|
||||
keypress: WindowEventMap["keypress"];
|
||||
click: WindowEventMap["click"];
|
||||
change: CustomEvent<any>;
|
||||
},
|
||||
{ default: {}; content: {} }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue