kopia lustrzana https://github.com/shoelace-style/shoelace
update changelog and comment
rodzic
652ce6c9f1
commit
50972f2b38
|
@ -8,6 +8,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
|
|||
|
||||
## Next
|
||||
|
||||
- Added TypeScript types to all custom events [#1183](https://github.com/shoelace-style/shoelace/pull/1183)
|
||||
- Fixed a bug in `<sl-select>` that caused the display label to render incorrectly in Chrome after form validation [#1197](https://github.com/shoelace-style/shoelace/discussions/1197)
|
||||
- Fixed a bug in `<sl-input>` that prevented users from applying their own value for `autocapitalize`, `autocomplete`, and `autocorrect` when using `type="password` [#1205](https://github.com/shoelace-style/shoelace/issues/1205)
|
||||
- Fixed a bug in `<sl-tab-group>` that prevented scroll controls from showing when dynamically adding tabs [#1208](https://github.com/shoelace-style/shoelace/issues/1208)
|
||||
|
|
|
@ -39,9 +39,9 @@ type EventTypesWithoutRequiredDetail = {
|
|||
// Helper to make a specific property of an object non-optional
|
||||
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
||||
|
||||
// Given an event name string, get a valid type for the options to initialize the event that is more restrictive
|
||||
// than just CustomEventInit when appropriate (validate the type of the event detail, and require it to be
|
||||
// provided if the event requires it)
|
||||
// Given an event name string, get a valid type for the options to initialize the event that is more restrictive than
|
||||
// just CustomEventInit when appropriate (validate the type of the event detail, and require it to be provided if the
|
||||
// event requires it)
|
||||
type SlEventInit<T> = T extends keyof GlobalEventHandlersEventMap
|
||||
? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>>
|
||||
? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>>
|
||||
|
|
Ładowanie…
Reference in New Issue