@@ -3,7 +3,6 @@ import SelectorCombinatorEnum from './SelectorCombinatorEnum.js';
33import DOMException from '../exception/DOMException.js' ;
44import ISelectorPseudo from './ISelectorPseudo.js' ;
55import Element from '../nodes/element/Element.js' ;
6- import Document from '../nodes/document/Document.js' ;
76import DocumentFragment from '../nodes/document-fragment/DocumentFragment.js' ;
87
98/**
@@ -72,13 +71,16 @@ export default class SelectorParser {
7271 *
7372 * @param selector Selector.
7473 * @param options Options.
75- * @param options.scope Scope.
74+ * @param [ options.scope] Scope.
7675 * @param [options.ignoreErrors] Ignores errors.
7776 * @returns Selector item.
7877 */
7978 public static getSelectorItem (
8079 selector : string ,
81- options ?: { scope ?: Element | Document | DocumentFragment ; ignoreErrors ?: boolean }
80+ options ?: {
81+ scope ?: Element | DocumentFragment ;
82+ ignoreErrors ?: boolean ;
83+ }
8284 ) : SelectorItem {
8385 return this . getSelectorGroups ( selector , options ) [ 0 ] [ 0 ] ;
8486 }
@@ -88,13 +90,16 @@ export default class SelectorParser {
8890 *
8991 * @param selector Selector.
9092 * @param options Options.
91- * @param options.scope Scope.
93+ * @param [ options.scope] Scope.
9294 * @param [options.ignoreErrors] Ignores errors.
9395 * @returns Selector groups.
9496 */
9597 public static getSelectorGroups (
9698 selector : string ,
97- options ?: { scope ?: Element | Document | DocumentFragment ; ignoreErrors ?: boolean }
99+ options ?: {
100+ scope ?: Element | DocumentFragment ;
101+ ignoreErrors ?: boolean ;
102+ }
98103 ) : Array < Array < SelectorItem > > {
99104 selector = selector . trim ( ) ;
100105 const ignoreErrors = options ?. ignoreErrors ;
@@ -296,15 +301,18 @@ export default class SelectorParser {
296301 *
297302 * @param name Pseudo name.
298303 * @param args Pseudo arguments.
299- * @param options Options.
300- * @param options.scope Scope.
304+ * @param [ options] Options.
305+ * @param [ options.scope] Scope.
301306 * @param [options.ignoreErrors] Ignores errors.
302307 * @returns Pseudo.
303308 */
304309 private static getPseudo (
305310 name : string ,
306311 args : string | null | undefined ,
307- options ?: { scope ?: Element | Document | DocumentFragment ; ignoreErrors ?: boolean }
312+ options ?: {
313+ scope ?: Element | DocumentFragment ;
314+ ignoreErrors ?: boolean ;
315+ }
308316 ) : ISelectorPseudo {
309317 const lowerName = name . toLowerCase ( ) ;
310318
0 commit comments