index.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. declare const defaultOutdent: Outdent;
  2. export interface Outdent {
  3. /**
  4. * Remove indentation from a template literal.
  5. */
  6. (strings: TemplateStringsArray, ...values: Array<any>): string;
  7. /**
  8. * Create and return a new Outdent instance with the given options.
  9. */
  10. (options: Options): Outdent;
  11. /**
  12. * Remove indentation from a string
  13. */
  14. string(str: string): string;
  15. }
  16. export interface Options {
  17. trimLeadingNewline?: boolean;
  18. trimTrailingNewline?: boolean;
  19. /**
  20. * Normalize all newlines in the template literal to this value.
  21. *
  22. * If `null`, newlines are left untouched.
  23. *
  24. * Newlines that get normalized are '\r\n', '\r', and '\n'.
  25. *
  26. * Newlines within interpolated values are *never* normalized.
  27. *
  28. * Although intended for normalizing to '\n' or '\r\n',
  29. * you can also set to any string; for example ' '.
  30. */
  31. newline?: string | null;
  32. }
  33. export default defaultOutdent;
  34. export { defaultOutdent as outdent };
  35. //# sourceMappingURL=index.d.ts.map