@@ -199,7 +199,7 @@ export function BaseRRDocumentImpl<
199199> ( RRNodeClass : RRNode ) {
200200 return class BaseRRDocument extends RRNodeClass implements IRRDocument {
201201 public readonly nodeType : number = NodeType . DOCUMENT_NODE ;
202- public readonly nodeName : '#document' = '#document' ;
202+ public readonly nodeName = '#document' as const ;
203203 public readonly compatMode : 'BackCompat' | 'CSS1Compat' = 'CSS1Compat' ;
204204 public readonly RRNodeType = RRNodeType . Document ;
205205 public textContent : string | null = null ;
@@ -604,7 +604,7 @@ export function BaseRRTextImpl<RRNode extends ConstrainedConstructor<IRRNode>>(
604604 // @ts -ignore
605605 return class BaseRRText extends RRNodeClass implements IRRText {
606606 public readonly nodeType : number = NodeType . TEXT_NODE ;
607- public readonly nodeName : '#text' = '#text' ;
607+ public readonly nodeName = '#text' as const ;
608608 public readonly RRNodeType = RRNodeType . Text ;
609609 public data : string ;
610610
@@ -634,7 +634,7 @@ export function BaseRRCommentImpl<
634634 // @ts -ignore
635635 return class BaseRRComment extends RRNodeClass implements IRRComment {
636636 public readonly nodeType : number = NodeType . COMMENT_NODE ;
637- public readonly nodeName : '#comment' = '#comment' ;
637+ public readonly nodeName = '#comment' as const ;
638638 public readonly RRNodeType = RRNodeType . Comment ;
639639 public data : string ;
640640
@@ -666,7 +666,7 @@ export function BaseRRCDATASectionImpl<
666666 extends RRNodeClass
667667 implements IRRCDATASection
668668 {
669- public readonly nodeName : '#cdata-section' = '#cdata-section' ;
669+ public readonly nodeName = '#cdata-section' as const ;
670670 public readonly nodeType : number = NodeType . CDATA_SECTION_NODE ;
671671 public readonly RRNodeType = RRNodeType . CDATA ;
672672 public data : string ;
0 commit comments