Class Module

A Module represents a single Earth Engine source code file.

Hierarchy

  • Module

Constructors

  • Parameters

    • path: string
    • repository: Repository
    • code: string
    • stats: { size: number }
      • size: number
    • commit: string

    Returns Module

Properties

ast: ParseResult<File>
code: string
commit: string
dependencies: undefined | Module[]
license: string
name: string
path: string
repository: Repository
stats: { size: number }

Type declaration

  • size: number

Methods

  • Recursively check for circular imports downstream of this module. Throw if any are found.

    Throws

    If any circular import is found between modules downstream of this module.

    Returns void

  • Build a dependency tree from all downstream modules.

    Returns

    The dependency tree of all modules required through this module/

    Parameters

    • options: { pretty: undefined | boolean } = {}
      • pretty: undefined | boolean

        If true, colors are included in the dependency tree for terminal output.

    Returns DependencyTree

  • Get a flat array of all modules required downstream.

    Returns

    All modules required downstream.

    Returns Module[]

  • Parse all downstream dependencies and load them.

    Returns

    A promise resolving to loaded modules required downstream of this script.

    Parameters

    • Optional loaded: { [k: string]: Module } = {}

      An optional list of already loaded module paths. This is used internally to avoid circular dependencies, and should not be passed by users.

    Returns Promise<Module[]>

  • Parse all module paths required by the root module code.

    Returns

    The path of all modules required by the given code.

    Returns string[]

  • Parse a license code block from the module AST. Currently, this only supports blocks that include a @license tag.

    Returns

    The license code block.

    Returns string

Generated using TypeDoc