GlobPattern
GlobPattern =
object
Defined in: packages/format-glob/src/ast.ts:58
A parsed glob pattern, with the dialect-level decisions already resolved.
Properties
Section titled “Properties”anchored
Section titled “anchored”
readonlyanchored:boolean
Defined in: packages/format-glob/src/ast.ts:62
Set when a leading / anchored the pattern in a dialect that allows it.
comment
Section titled “comment”
readonlycomment:string|null
Defined in: packages/format-glob/src/ast.ts:79
The text after a leading # in a dialect that gives comments meaning, or
null when the pattern is not one. A comment matches nothing, and
GlobPattern.nodes is empty.
directoryOnly
Section titled “directoryOnly”
readonlydirectoryOnly:boolean
Defined in: packages/format-glob/src/ast.ts:65
Set when a trailing / restricted it to directories.
negated
Section titled “negated”
readonlynegated:boolean
Defined in: packages/format-glob/src/ast.ts:72
Set when a leading ! negated the whole pattern in a dialect that allows
it. Distinct from a class negation, which inverts one […] and nothing
else.
readonlynodes: readonlyGlobNode[]
Defined in: packages/format-glob/src/ast.ts:59