Skip to content

printGlob

printGlob(pattern): string

Defined in: packages/format-glob/src/print-glob.ts:68

Renders a parsed pattern back to glob source.

Round-trips the constructs the dialect gave meaning to; anything that parsed as literal text comes back escaped, so the printed form means the same thing under any dialect. Literal text opening with ! or # is escaped for the same reason — under "bash" those two positions are pattern negation and a comment, not text.

GlobPattern

string