mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
fix(types): dispatched events without a detail value should be null
(#1124)
Currently, dispatched events without `e.detail` have a type of `any`. We can be more specific as a `CustomEvent` detail value is `null`.
This commit is contained in:
parent
2f3cff2942
commit
714f47a635
19 changed files with 97 additions and 93 deletions
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {any} load
|
||||
* @event {any} error
|
||||
* @event {null} load
|
||||
* @event {null} error
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {any} save
|
||||
* @event {null} save
|
||||
* @event {{ prevValue: any; value: any; }} update
|
||||
*/
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @typedef {string} MultiSelectItemText
|
||||
* @typedef {{ id: MultiSelectItemId; text: MultiSelectItemText; }} MultiSelectItem
|
||||
* @event {{ selectedIds: MultiSelectItemId[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; }} select
|
||||
* @event {any} clear
|
||||
* @event {null} clear
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {any} expand
|
||||
* @event {any} collapse
|
||||
* @event {null} expand
|
||||
* @event {null} collapse
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {any} open
|
||||
* @event {any} close
|
||||
* @event {null} open
|
||||
* @event {null} close
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {any} open
|
||||
* @event {any} close
|
||||
* @event {null} open
|
||||
* @event {null} close
|
||||
*/
|
||||
|
||||
/** Specify the tooltip text */
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script>
|
||||
/**
|
||||
* @typedef {{ href: string; text: string; description?: string; }} HeaderSearchResult
|
||||
* @event {any} active
|
||||
* @event {any} inactive
|
||||
* @event {any} clear
|
||||
* @event {null} active
|
||||
* @event {null} inactive
|
||||
* @event {null} clear
|
||||
* @event {{ value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult }} select
|
||||
* @slot {{ result: HeaderSearchResult; index: number }}
|
||||
*/
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {any} open
|
||||
* @event {any} close
|
||||
* @event {any} click:overlay
|
||||
* @event {null} open
|
||||
* @event {null} close
|
||||
* @event {null} click:overlay
|
||||
*/
|
||||
|
||||
/** Set to `true` to use the fixed variant */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue