opkminnesota.blogg.se

Code writer
Code writer







code writer

conditionalWriteLine(condition: boolean, textFunc: () => string) - Writes some text and adds a newline if the condition is matched.conditionalWriteLine(condition: boolean, text: string) - Writes some text and adds a newline if the condition is matched.conditionalWrite(condition: boolean, textFunc: () => string) - Writes if the condition is matched.conditionalWrite(condition: boolean, text: string) - Writes if the condition is matched.conditionalBlankLine(condition: boolean) - Writes a blank line if the condition is matched.

code writer

  • conditionalNewLine(condition: boolean) - Writes a newline if the condition is matched.
  • write(text: string) - Writes some text.
  • code writer

    tabIfLastNot() - Writes a tab if the last was not a tab.Optionally writes multiple tabs when providing a number. spaceIfLastNot() - Writes a space if the last was not a space.Optionally writes multiple spaces when providing a number. space(times?: number) - Writes a space.indent(block?: () => void) - Indents a block of code.Optionally indents multiple times when providing a number. indent(times?: number) - Indents the current line.quote(text: string) - Writes text surrounded in quotes.blankLineIfLastNot() - Writes a blank line if what was written last wasn't a blank line.newLineIfLastNot() - Writes a newline if what was written last wasn't a newline.writeLine(text: string) - Writes some text and adds a newline.getLength() - Get the current number of characters.inlineBlock(block?: () => void) - Same as block, but doesn't add a space before the first brace and doesn't add a newline at the end.block(block?: () => void) - Indents all the code written within and surrounds it in braces.Class M圜lass extends OtherClass MyDecorator ( 1, 2 ) myMethod ( myParam: any ) Methods









    Code writer