All files / src/NodeLike/CharacterDataLike/CommentLike AbstractCommentLike.ts

28.57% Statements 2/7
0% Branches 0/1
0% Functions 0/2
28.57% Lines 2/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 212x                                       2x
import AbstractCharacterDataLike     from '../AbstractCharacterDataLike';
import ICommentLike                  from './ICommentLike';
import TConstructor                  from '../../../TypeAliases/TConstructor';
abstract class AbstractCommentLike extends AbstractCharacterDataLike implements ICommentLike {
  abstract readonly nodeType: 8;
  abstract readonly nodeName: '#comment';
 
  /* Comment nodes have no children, so this is a no-op. */
  normalize(): void {
    return;
  }
 
  cloneNode(deep: boolean = false): ICommentLike {
    /* Get rid of VS not-used error. */deep;
    const ctor = <TConstructor<ICommentLike>>this.constructor;
    const comment = new ctor(this.__data);
    return comment;
  }
}
 
export default AbstractCommentLike;