mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +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
|
@ -4915,9 +4915,9 @@
|
|||
}
|
||||
],
|
||||
"events": [
|
||||
{ "type": "dispatched", "name": "active", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "inactive", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "clear", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "active", "detail": "null" },
|
||||
{ "type": "dispatched", "name": "inactive", "detail": "null" },
|
||||
{ "type": "dispatched", "name": "clear", "detail": "null" },
|
||||
{
|
||||
"type": "dispatched",
|
||||
"name": "select",
|
||||
|
@ -5115,8 +5115,8 @@
|
|||
{ "name": "loading", "default": false, "slot_props": "{}" }
|
||||
],
|
||||
"events": [
|
||||
{ "type": "dispatched", "name": "load", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "error", "detail": "any" }
|
||||
{ "type": "dispatched", "name": "load", "detail": "null" },
|
||||
{ "type": "dispatched", "name": "error", "detail": "null" }
|
||||
],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "Element", "name": "img" }
|
||||
|
@ -5920,7 +5920,7 @@
|
|||
],
|
||||
"slots": [],
|
||||
"events": [
|
||||
{ "type": "dispatched", "name": "save", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "save", "detail": "null" },
|
||||
{
|
||||
"type": "dispatched",
|
||||
"name": "update",
|
||||
|
@ -6796,7 +6796,7 @@
|
|||
"name": "select",
|
||||
"detail": "{ selectedIds: MultiSelectItemId[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; }"
|
||||
},
|
||||
{ "type": "dispatched", "name": "clear", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "clear", "detail": "null" },
|
||||
{ "type": "forwarded", "name": "keydown", "element": "input" },
|
||||
{ "type": "forwarded", "name": "keyup", "element": "input" },
|
||||
{ "type": "forwarded", "name": "focus", "element": "input" }
|
||||
|
@ -9261,8 +9261,8 @@
|
|||
}
|
||||
],
|
||||
"events": [
|
||||
{ "type": "dispatched", "name": "expand", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "collapse", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "expand", "detail": "null" },
|
||||
{ "type": "dispatched", "name": "collapse", "detail": "null" },
|
||||
{ "type": "forwarded", "name": "click", "element": "SearchSkeleton" },
|
||||
{
|
||||
"type": "forwarded",
|
||||
|
@ -9831,9 +9831,9 @@
|
|||
],
|
||||
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
|
||||
"events": [
|
||||
{ "type": "dispatched", "name": "open", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "close", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "click:overlay", "detail": "any" }
|
||||
{ "type": "dispatched", "name": "open", "detail": "null" },
|
||||
{ "type": "dispatched", "name": "close", "detail": "null" },
|
||||
{ "type": "dispatched", "name": "click:overlay", "detail": "null" }
|
||||
],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "Element", "name": "nav" }
|
||||
|
@ -13104,8 +13104,8 @@
|
|||
}
|
||||
],
|
||||
"events": [
|
||||
{ "type": "dispatched", "name": "open", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "close", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "open", "detail": "null" },
|
||||
{ "type": "dispatched", "name": "close", "detail": "null" },
|
||||
{ "type": "forwarded", "name": "click", "element": "div" },
|
||||
{ "type": "forwarded", "name": "mousedown", "element": "div" }
|
||||
],
|
||||
|
@ -13193,8 +13193,8 @@
|
|||
}
|
||||
],
|
||||
"events": [
|
||||
{ "type": "dispatched", "name": "open", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "close", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "open", "detail": "null" },
|
||||
{ "type": "dispatched", "name": "close", "detail": "null" },
|
||||
{ "type": "forwarded", "name": "click", "element": "button" },
|
||||
{ "type": "forwarded", "name": "mouseover", "element": "button" },
|
||||
{ "type": "forwarded", "name": "mouseenter", "element": "button" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue