Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SourceNode

Index

Constructors

constructor

  • new SourceNode(): SourceNode
  • new SourceNode(line: number, column: number, source: string): SourceNode
  • new SourceNode(line: number, column: number, source: string, chunk?: string, name?: string): SourceNode
  • Returns SourceNode

  • Parameters

    • line: number
    • column: number
    • source: string

    Returns SourceNode

  • Parameters

    • line: number
    • column: number
    • source: string
    • Optional chunk: string
    • Optional name: string

    Returns SourceNode

Methods

add

  • add(chunk: string): void
  • Parameters

    • chunk: string

    Returns void

join

  • Parameters

    • sep: string

    Returns SourceNode

prepend

  • prepend(chunk: string): void
  • Parameters

    • chunk: string

    Returns void

replaceRight

  • replaceRight(pattern: string, replacement: string): SourceNode
  • Parameters

    • pattern: string
    • replacement: string

    Returns SourceNode

setSourceContent

  • setSourceContent(sourceFile: string, sourceContent: string): void
  • Parameters

    • sourceFile: string
    • sourceContent: string

    Returns void

toString

  • toString(): string
  • Returns string

toStringWithSourceMap

walk

  • walk(fn: function): void
  • Parameters

    Returns void

walkSourceContents

  • walkSourceContents(fn: function): void
  • Parameters

    • fn: function
        • (file: string, content: string): void
        • Parameters

          • file: string
          • content: string

          Returns void

    Returns void

Static fromStringWithSourceMap

  • Parameters

    Returns SourceNode

Generated using TypeDoc