stringifier.d.ts 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. import Node from './node';
  2. declare class Stringifier {
  3. builder: Stringifier.Builder;
  4. constructor(builder?: Stringifier.Builder);
  5. stringify(node: Node, semicolon?: boolean): void;
  6. root(node: any): void;
  7. comment(node: any): void;
  8. decl(node: any, semicolon: any): void;
  9. rule(node: any): void;
  10. atrule(node: any, semicolon: any): void;
  11. body(node: any): void;
  12. block(node: any, start: any): void;
  13. raw(node: Node, own: string, detect?: string): any;
  14. rawSemicolon(root: any): any;
  15. rawEmptyBody(root: any): any;
  16. rawIndent(root: any): any;
  17. rawBeforeComment(root: any, node: any): any;
  18. rawBeforeDecl(root: any, node: any): any;
  19. rawBeforeRule(root: any): any;
  20. rawBeforeClose(root: any): any;
  21. rawBeforeOpen(root: any): any;
  22. rawColon(root: any): any;
  23. beforeAfter(node: any, detect: any): any;
  24. rawValue(node: any, prop: any): any;
  25. }
  26. declare module Stringifier {
  27. interface Builder {
  28. (str: string, node?: Node, str2?: string): void;
  29. }
  30. }
  31. export default Stringifier;