tagu-tagu 4.0.2 → 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/README.md +1 -1
- package/package.json +1 -1
- package/src/Tag.ts +3 -3
package/README.md
CHANGED
|
@@ -419,7 +419,7 @@ function TwoComputedSignalsExample() {
|
|
|
419
419
|
]);
|
|
420
420
|
}
|
|
421
421
|
|
|
422
|
-
document.body.appendChild(
|
|
422
|
+
document.body.appendChild(TwoComputedSignalsExample());
|
|
423
423
|
```
|
|
424
424
|
[JSFiddle](https://jsfiddle.net/do_the_simplest/8hsuc5pn/5/)
|
|
425
425
|
|
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
|
}
|