Skip to content

GlobPattern

GlobPattern = object

Defined in: packages/format-glob/src/ast.ts:58

A parsed glob pattern, with the dialect-level decisions already resolved.

readonly anchored: boolean

Defined in: packages/format-glob/src/ast.ts:62

Set when a leading / anchored the pattern in a dialect that allows it.


readonly comment: 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.


readonly directoryOnly: boolean

Defined in: packages/format-glob/src/ast.ts:65

Set when a trailing / restricted it to directories.


readonly negated: 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.


readonly nodes: readonly GlobNode[]

Defined in: packages/format-glob/src/ast.ts:59