tagu-tagu 4.0.3 → 4.0.4
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/package.json +1 -1
- package/src/Tag.ts +3 -3
package/package.json
CHANGED
package/src/Tag.ts
CHANGED
|
@@ -25,10 +25,10 @@ export function Html<K extends keyof HTMLElementTagNameMap>(
|
|
|
25
25
|
return result;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export function Tag(
|
|
28
|
+
export function Tag<T extends Element=Element>(
|
|
29
29
|
html: string,
|
|
30
|
-
...initializers: ElementInitializer<
|
|
30
|
+
...initializers: ElementInitializer<T>[]
|
|
31
31
|
) {
|
|
32
|
-
const result = div({ html: html }).children[0];
|
|
32
|
+
const result = div({ html: html }).children[0] as T;
|
|
33
33
|
return Modify(result, ...initializers);
|
|
34
34
|
}
|