Comparing version 1.4.2 to 1.5.1
@@ -98,7 +98,7 @@ declare global { | ||
type Properties<T extends keyof HTMLElementTagNameMap> = { | ||
readonly [K in keyof Omit<HTMLElementTagNameMap[T], 'children'>]?: HTMLElementTagNameMap[T][K] extends (string | boolean | number) ? HTMLElementTagNameMap[T][K] : never; | ||
} | { | ||
readonly [K in keyof Omit<HTMLElementTagNameMap[T], 'children' | keyof HTMLAttributes>]?: HTMLElementTagNameMap[T][K] extends (string | boolean | number) ? HTMLElementTagNameMap[T][K] : never; | ||
} & { | ||
readonly toString: () => string; | ||
readonly children?: T extends JSX.EmptyElementTagName ? never : (string | string[]); | ||
} | HTMLAttributes; | ||
} & HTMLAttributes; | ||
type IntrinsicElements = { | ||
@@ -105,0 +105,0 @@ [T in keyof HTMLElementTagNameMap]: Properties<T>; |
@@ -26,7 +26,7 @@ "use strict"; | ||
.map(function (_a) { | ||
var _b; | ||
var _b, _c; | ||
var key = _a[0], value = _a[1]; | ||
return (typeof value === 'boolean' | ||
? key | ||
: key + "=\"" + ((_b = value === null || value === void 0 ? void 0 : value.toString().replace(/&/g, '&').replace(/"/g, '"')) !== null && _b !== void 0 ? _b : '') + "\""); | ||
: key + "=\"" + ((_c = (_b = value) === null || _b === void 0 ? void 0 : _b.toString().replace(/&/g, '&').replace(/"/g, '"')) !== null && _c !== void 0 ? _c : '') + "\""); | ||
}) | ||
@@ -33,0 +33,0 @@ .join(' '); |
{ | ||
"name": "html-tsx", | ||
"version": "1.4.2", | ||
"version": "1.5.1", | ||
"description": "Transform tsx to HTML string", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
13819