unescape.d.ts 956 B

12345678910111213141516171819202122
  1. import type { MinimatchOptions } from './index.js';
  2. /**
  3. * Un-escape a string that has been escaped with {@link escape}.
  4. *
  5. * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then
  6. * square-bracket escapes are removed, but not backslash escapes.
  7. *
  8. * For example, it will turn the string `'[*]'` into `*`, but it will not
  9. * turn `'\\*'` into `'*'`, because `\` is a path separator in
  10. * `windowsPathsNoEscape` mode.
  11. *
  12. * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and
  13. * backslash escapes are removed.
  14. *
  15. * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
  16. * or unescaped.
  17. *
  18. * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be
  19. * unescaped.
  20. */
  21. export declare const unescape: (s: string, { windowsPathsNoEscape, magicalBraces, }?: Pick<MinimatchOptions, "windowsPathsNoEscape" | "magicalBraces">) => string;
  22. //# sourceMappingURL=unescape.d.ts.map