interface PathBuilder { createPathFilter ( _path ) : PathFilter ; } interface PathFilter { path : string ; elements : HTMLElement [ ] ; } class CssBuilder implements PathBuilder { getIdExpression ( elementId ) { return '#' + elementId ; } getDescendantSeparator ( ) { return " " ; } getChildSeparator ( ) { return ">" ; } getMultipleTagNameAndClassNameExpression ( tagName , className ) { return tagName + '.' + className ; } getSingleTagNameAndClassNameExpression ( tagName , className ) { return tagName + '.' + className ; } createPathFilter ( _path ) { var path = CustomBlockerUtil . trim ( _path ) ; return new CssPathFilter ( path ) ; } } class CssPathFilter implements PathFilter { path : string ; elements : HTMLElement [ ] ; constructor ( path ) { this . path = path ; this . elements = CustomBlockerUtil . getElementsByCssSelector ( path ) ; } }