CodeWriter.d.ts 718 B

12345678910111213141516171819202122232425262728
  1. interface ICodeWriterConfig {
  2. blockStart?: string;
  3. blockEnd?: string;
  4. blockFromNewLine?: boolean;
  5. usingTabs?: boolean;
  6. endOfLine?: string;
  7. fileMark?: string;
  8. }
  9. export default class CodeWriter {
  10. private blockStart;
  11. private blockEnd;
  12. private blockFromNewLine;
  13. private indentStr;
  14. private endOfLine;
  15. private lines;
  16. private indent;
  17. private fileMark;
  18. constructor(config?: ICodeWriterConfig);
  19. writeMark(): void;
  20. writeln(fmt?: string, ...args: any[]): CodeWriter;
  21. startBlock(): CodeWriter;
  22. endBlock(): CodeWriter;
  23. incIndent(): CodeWriter;
  24. decIndent(): CodeWriter;
  25. reset(): void;
  26. toString(): string;
  27. save(filePath: string): void;
  28. }