Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Resolver

The base class for all resolvers. Resolvers manage obtaining and caching files from the remote repository.

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Parameters

    • path: string

      The path relative from the repository's root

    • lang: ResolverRegion

      The language

    • repo: Repository

      The GitHub repository

    Returns Resolver

Properties

cache

cache: Map<string, any>

directory

directory: Directory

lang

lang: string

path

path: string

repo

Accessors

initialized

  • get initialized(): boolean
  • Returns boolean

Methods

getFile

  • getFile(file: string, directory?: Directory): Promise<any>
  • Retrieves a file from cache or downloads the file from the repository if it doesn't exist.

    Parameters

    • file: string

      The file name to retrieve.

    • Default value directory: Directory = this.directory

      The directory to lookup from.

    Returns Promise<any>

init

  • init(): Promise<void>
  • Initializes this repository by sloading the directory and retrieving its files

    Returns Promise<void>

Abstract resolve

  • resolve(model: IModel): Promise<any[]>
  • Resolves a model's loader method and passes back resolved values to its arguments

    Parameters

    Returns Promise<any[]>

Generated using TypeDoc