@@ -83,36 +83,34 @@ export function create_text(value = '') {
8383/**
8484 * @template {Node} N
8585 * @param {N } node
86- * @returns {Node | null }
8786 */
8887/*@__NO_SIDE_EFFECTS__ */
8988export function get_first_child ( node ) {
90- return first_child_getter . call ( node ) ;
89+ return /** @type { TemplateNode | null } */ ( first_child_getter . call ( node ) ) ;
9190}
9291
9392/**
9493 * @template {Node} N
9594 * @param {N } node
96- * @returns {Node | null }
9795 */
9896/*@__NO_SIDE_EFFECTS__ */
9997export function get_next_sibling ( node ) {
100- return next_sibling_getter . call ( node ) ;
98+ return /** @type { TemplateNode | null } */ ( next_sibling_getter . call ( node ) ) ;
10199}
102100
103101/**
104102 * Don't mark this as side-effect-free, hydration needs to walk all nodes
105103 * @template {Node} N
106104 * @param {N } node
107105 * @param {boolean } is_text
108- * @returns {Node | null }
106+ * @returns {TemplateNode | null }
109107 */
110108export function child ( node , is_text ) {
111109 if ( ! hydrating ) {
112110 return get_first_child ( node ) ;
113111 }
114112
115- var child = /** @type { TemplateNode } */ ( get_first_child ( hydrate_node ) ) ;
113+ var child = get_first_child ( hydrate_node ) ;
116114
117115 // Child can be null if we have an element with a single child, like `<p>{text}</p>`, where `text` is empty
118116 if ( child === null ) {
@@ -163,7 +161,7 @@ export function first_child(fragment, is_text = false) {
163161 * @param {TemplateNode } node
164162 * @param {number } count
165163 * @param {boolean } is_text
166- * @returns {Node | null }
164+ * @returns {TemplateNode | null }
167165 */
168166export function sibling ( node , count = 1 , is_text = false ) {
169167 let next_sibling = hydrating ? hydrate_node : node ;
@@ -195,7 +193,7 @@ export function sibling(node, count = 1, is_text = false) {
195193 }
196194
197195 set_hydrate_node ( next_sibling ) ;
198- return /** @type { TemplateNode } */ ( next_sibling ) ;
196+ return next_sibling ;
199197}
200198
201199/**
0 commit comments