@@ -66,7 +66,7 @@ export class MockNode {
6666 return - 1 ;
6767 }
6868
69- get firstChild ( ) {
69+ get firstChild ( ) : MockNode | null {
7070 return this . childNodes [ 0 ] || null ;
7171 }
7272
@@ -103,11 +103,11 @@ export class MockNode {
103103 return this === node ;
104104 }
105105
106- get lastChild ( ) {
106+ get lastChild ( ) : MockNode | null {
107107 return this . childNodes [ this . childNodes . length - 1 ] || null ;
108108 }
109109
110- get nextSibling ( ) {
110+ get nextSibling ( ) : MockNode | null {
111111 if ( this . parentNode != null ) {
112112 const index = this . parentNode . childNodes . indexOf ( this ) + 1 ;
113113 return this . parentNode . childNodes [ index ] || null ;
@@ -129,7 +129,7 @@ export class MockNode {
129129 this . parentNode = value ;
130130 }
131131
132- get previousSibling ( ) {
132+ get previousSibling ( ) : MockNode | null {
133133 if ( this . parentNode != null ) {
134134 const index = this . parentNode . childNodes . indexOf ( this ) - 1 ;
135135 return this . parentNode . childNodes [ index ] || null ;
@@ -304,7 +304,7 @@ export class MockElement extends MockNode {
304304 return dispatchEvent ( this , ev ) ;
305305 }
306306
307- get firstElementChild ( ) {
307+ get firstElementChild ( ) : MockElement | null {
308308 return this . children [ 0 ] || null ;
309309 }
310310
@@ -481,7 +481,7 @@ export class MockElement extends MockNode {
481481 this . setAttributeNS ( null , 'lang' , value ) ;
482482 }
483483
484- get lastElementChild ( ) {
484+ get lastElementChild ( ) : MockElement | null {
485485 const children = this . children ;
486486 return children [ children . length - 1 ] || null ;
487487 }
0 commit comments