mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-04-03 04:25:53 +02:00
🐛 Better types for on*
This commit is contained in:
parent
ed7e6c7963
commit
3435ea6cfe
9
index.d.ts
vendored
9
index.d.ts
vendored
@ -52,9 +52,12 @@ type IsReadonly<T, K extends keyof T> =
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
type ElementAttributes<T extends SupportedElement>= Partial<{
|
type ElementAttributes<T extends SupportedElement>= Partial<{
|
||||||
[K in keyof _fromElsInterfaces<T>]: IsReadonly<_fromElsInterfaces<T>, K> extends false
|
[K in keyof _fromElsInterfaces<T>]:
|
||||||
? _fromElsInterfaces<T>[K] | ddeSignal<_fromElsInterfaces<T>[K]>
|
_fromElsInterfaces<T>[K] extends ((...p: any[])=> any)
|
||||||
: ddeStringable
|
? _fromElsInterfaces<T>[K] | ((...p: Parameters<_fromElsInterfaces<T>[K]>)=> ddeSignal<ReturnType<_fromElsInterfaces<T>[K]>>)
|
||||||
|
: (IsReadonly<_fromElsInterfaces<T>, K> extends false
|
||||||
|
? _fromElsInterfaces<T>[K] | ddeSignal<_fromElsInterfaces<T>[K]>
|
||||||
|
: ddeStringable)
|
||||||
} & AttrsModified> & Record<string, any>;
|
} & AttrsModified> & Record<string, any>;
|
||||||
export function classListDeclarative<El extends SupportedElement>(
|
export function classListDeclarative<El extends SupportedElement>(
|
||||||
element: El,
|
element: El,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user