@sigil-dev/types 0.9.19 → 0.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +10 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -90,10 +90,17 @@ type NativeHandlers<T> = {
|
|
|
90
90
|
[K in keyof T]: K extends `on${string}` ? NativeHandler<T[K]> : T[K];
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* HTML's own spelling of every camelCase prop: `onclick`, `spellcheck`,
|
|
95
|
+
* `autocomplete`, `tabindex`, `readonly`. Sigil passes attributes through as
|
|
96
|
+
* written, and the browser reads them case-insensitively.
|
|
97
|
+
*/
|
|
93
98
|
type LowercaseHandlers<T> = {
|
|
94
|
-
[K in keyof T as K extends
|
|
95
|
-
? Lowercase<K
|
|
96
|
-
|
|
99
|
+
[K in keyof T as K extends string
|
|
100
|
+
? Lowercase<K> extends K
|
|
101
|
+
? never
|
|
102
|
+
: Lowercase<K>
|
|
103
|
+
: never]?: K extends `on${string}` ? NativeHandler<T[K]> : T[K];
|
|
97
104
|
};
|
|
98
105
|
|
|
99
106
|
type SigilIntrinsicElements = {
|