@sigil-dev/types 0.9.19 → 0.9.21

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.
Files changed (2) hide show
  1. package/index.d.ts +10 -3
  2. 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 `on${string}`
95
- ? Lowercase<K & string>
96
- : never]?: NativeHandler<T[K]>;
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 = {
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "url": "git+https://git.cane1712.dev/sigil/sigil.git",
9
9
  "directory": "packages/types"
10
10
  },
11
- "version": "0.9.19",
11
+ "version": "0.9.21",
12
12
  "type": "module",
13
13
  "exports": {
14
14
  ".": "./index.d.ts"