Implements

Constructors

Properties

breakBetweenModuleInstantations: boolean = false
deepGlobals: {
    didAddNewline: boolean;
    newlineAfterNextCommentReason: string;
    shouldAddNewlineAfterNextComment: boolean;
} = ...

We store data that is global between all the copies of the ASTPrinter in an object so that it is passed by reference.

Type declaration

  • didAddNewline: boolean
  • newlineAfterNextCommentReason: string
  • shouldAddNewlineAfterNextComment: boolean
doNotAddNewlineAfterBlockStatement: boolean = false
firstModuleInstantation: boolean = true
indentLevel: number = 0

Methods

  • Parameters

    • forced: boolean = false
    • newlineReason: string = "no reason"

    Returns string

  • Schedules a newline to be added after the next comment, if present. Otherwise it will be inserted immediately.

    Parameters

    • reason: string

    Returns void

  • Tries printing a ModuleInstantiationStmt without breaking it, if it exceeds 40 chars it breaks it, by printing it again.

    Parameters

    Returns string

Generated using TypeDoc