Skip to main content

ModuleScopeControl

ModuleScopeControl

Index

Constructors

constructor

  • Creates ModuleScopeControl instance with given ModuleReport.


    Parameters

    • moduleReport: default

      An associated module report.

    Returns default

Properties

_anonClassCntr

_anonClassCntr: number

_anonMethodCntr

_anonMethodCntr: number

_report

_report: default

_scopeStackClass

_scopeStackClass: default[]

Stores the current class report scope stack which is lazily created in createScope.}

_scopeStackMethod

_scopeStackMethod: (default | default)[]

Stores the current method report scope stack which is lazily created in createScope.

_scopeStackNestedMethod

_scopeStackNestedMethod: (default | default)[]

Stores the current nested method report scope stack which is lazily created in createScope.

Methods

createScope

  • createScope(newScope?: { lineEnd?: number; lineStart?: number; name?: string; paramNames?: string[]; superClassName?: string; type?: string }): any
  • Creates a report scope when a class or method is entered.


    Parameters

    • newScope: { lineEnd?: number; lineStart?: number; name?: string; paramNames?: string[]; superClassName?: string; type?: string } = {}

      An object hash defining the new scope including:

      (string) type - Type of report to create.
      (string) name - Name of the class or method.
      (number) lineStart - Start line of method.
      (number) lineEnd - End line of method.
      (Array<string>) paramNames - (For method scopes) An array of parameters names for method.

    Returns any

getCurrentClassReport

  • getCurrentClassReport(): default
  • Returns the current class report.


    Returns default

getCurrentMethodReport

  • getCurrentMethodReport(): default | default
  • Returns the current method report.


    Returns default | default

popScope

  • popScope(scope?: { type?: string }): void
  • Pops a report scope.


    Parameters

    • scope: { type?: string } = {}

      An object hash defining the scope including:

      (string) type - Type of report scope to pop off the stack.

    Returns void