quote.d.ts 492 B

123456789101112131415
  1. import parse = require('./parse');
  2. /**
  3. * Quotes an array of tokens into a shell-safe string.
  4. *
  5. * Accepts strings and the object shapes that {@link parse} emits. Throws a
  6. * `TypeError` for unrecognized object shapes, `op` values outside the
  7. * allowlist, or `pattern`/`comment` values containing line terminators.
  8. *
  9. * @param args - Array of tokens to quote.
  10. * @returns A shell-safe quoted string.
  11. */
  12. declare function quote(args: readonly parse.ParseEntry[]): string;
  13. export = quote;