Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Code

Hierarchy

  • Code

Index

Constructors

Properties

Methods

Constructors

  • new Code(code: string, commentDelim: string): Code
  • new Code(code: string[], commentDelim: string): Code

Properties

lines: CodeLine[]

Methods

  • extractCode(withComments?: boolean): string
  • All newlines are \n

    Parameters

    • withComments: boolean = false

    Returns string

  • trimComments(inLines: string[], delim: string): CodeLine[]
  • Removes trailing comments, along with any preceding whitespace. Returns an array of objects (one for each line) to be passed to extractCode.

    Parameters

    • inLines: string[]
    • delim: string

    Returns CodeLine[]

Generated using TypeDoc