@@ -67,7 +67,7 @@ function createFragment(
67
67
return frag
68
68
}
69
69
70
- function normalizeNode ( node : any , anchor ?: Element ) : Block {
70
+ function normalizeNode ( node : any , anchor ?: Node ) : Block {
71
71
if ( node instanceof Node || isFragment ( node ) ) {
72
72
anchor && ( anchor . textContent = '' )
73
73
return node
@@ -91,7 +91,7 @@ function normalizeNode(node: any, anchor?: Element): Block {
91
91
}
92
92
}
93
93
94
- function resolveValue ( current : Block , value : any , anchor ?: Element ) {
94
+ function resolveValue ( current : Block , value : any , anchor ?: Node ) {
95
95
const node = normalizeNode ( value , anchor )
96
96
if ( current ) {
97
97
if ( isFragment ( current ) ) {
@@ -118,7 +118,7 @@ function resolveValue(current: Block, value: any, anchor?: Element) {
118
118
return node
119
119
}
120
120
121
- function resolveValues ( values : any [ ] = [ ] , _anchor ?: Element ) {
121
+ function resolveValues ( values : any [ ] = [ ] , _anchor ?: Node ) {
122
122
const nodes : Block [ ] = [ ]
123
123
const frag = createFragment ( nodes , _anchor )
124
124
const scopes : EffectScope [ ] = [ ]
@@ -139,7 +139,7 @@ function resolveValues(values: any[] = [], _anchor?: Element) {
139
139
return frag
140
140
}
141
141
142
- export function setNodes ( anchor : Element , ...values : any [ ] ) {
142
+ export function setNodes ( anchor : Node , ...values : any [ ] ) {
143
143
const resolvedValues = resolveValues ( values , anchor )
144
144
anchor . parentNode && insert ( resolvedValues , anchor . parentNode , anchor )
145
145
}
0 commit comments