import { None , Option } from "@siteimprove/alfa-option" ; import * as dom from "@siteimprove/alfa-dom" ; import { Node } from "../node" ; public export class Container extends Node { public static of ( owner , children = [ ] ) { return new Container ( owner , Array . from ( children ) ) ; } private constructor ( owner , children ) { super ( owner , children ) ; } public clone ( parent = None ) { return new Container ( this . _node , this . _children . map ( ( child ) => child . clone ( ) ) ) ; } public isIgnored ( ) { return true ; } public toJSON ( ) { return { type : "container" , node : this . _node . path ( ) , children : this . _children . map ( ( child ) => child . toJSON ( ) ) , } ; } public toString ( ) { return [ "container" , ... this . _children . map ( ( child ) => indent ( child . toString ( ) ) ) , ] . join ( "\n" ) ; } } public export namespace Container { export interface JSON extends Node . JSON { type : "container" ; } } function indent ( input ) { return input . replace ( /^/gm , "  " ) ; }