stringifier.d.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import {
  2. Document,
  3. Root,
  4. Comment,
  5. Declaration,
  6. Builder,
  7. AnyNode,
  8. Rule,
  9. AtRule,
  10. Container
  11. } from './postcss.js'
  12. export default class Stringifier {
  13. builder: Builder
  14. constructor(builder: Builder)
  15. stringify(node: AnyNode, semicolon?: boolean): void
  16. document(node: Document): void
  17. root(node: Root): void
  18. comment(node: Comment): void
  19. decl(node: Declaration, semicolon?: boolean): void
  20. rule(node: Rule): void
  21. atrule(node: AtRule, semicolon?: boolean): void
  22. body(node: Container): void
  23. block(node: AnyNode, start: string): void
  24. raw(node: AnyNode, own: string | null, detect?: string): string
  25. rawSemicolon(root: Root): boolean | undefined
  26. rawEmptyBody(root: Root): string | undefined
  27. rawIndent(root: Root): string | undefined
  28. rawBeforeComment(root: Root, node: Comment): string | undefined
  29. rawBeforeDecl(root: Root, node: Declaration): string | undefined
  30. rawBeforeRule(root: Root): string | undefined
  31. rawBeforeClose(root: Root): string | undefined
  32. rawBeforeOpen(root: Root): string | undefined
  33. rawColon(root: Root): string | undefined
  34. beforeAfter(node: AnyNode, detect: 'before' | 'after'): string
  35. rawValue(node: AnyNode, prop: string): string
  36. }