Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShareCfgResolver

A resolver that resolves files from the /sharecfg directory

Hierarchy

Index

Constructors

constructor

Properties

cache

cache: Map<string, any>

dependencies

dependencies: Map<string, [string, boolean, Transformer]>

directory

directory: Directory

lang

lang: string

path

path: string

repo

subDirectories

subDirectories: Map<string, Directory>

Accessors

initialized

  • get initialized(): boolean
  • Returns boolean

Methods

add

  • add(type: string, file: string, hasSubList?: boolean, transform?: Transformer): void
  • Map an argument type to a file for dependency resolving

    Parameters

    • type: string

      The argument type

    • file: string

      The file to be resolved

    • Default value hasSubList: boolean = false

      Whether the file references other files

    • Default value transform: Transformer = ShareCfgResolver.DEFAULT_TRANSFORMER

      A function called to modify the resolved object before being passed

    Returns void

getFile

  • getFile(type: string): Promise<any>
  • Resolve a dependency

    Parameters

    • type: string

      The dependency name

    Returns Promise<any>

init

  • init(): Promise<void>
  • Initializes this resolver. This is also where file names are mapped onto strings for dependency resolution.

    Returns Promise<void>

resolve

  • resolve(model: IModel): Promise<any[]>
  • Parameters

    Returns Promise<any[]>

Static DEFAULT_TRANSFORMER

  • DEFAULT_TRANSFORMER(obj: { all: number[] }): unknown
  • Parameters

    • obj: { all: number[] }
      • all: number[]

    Returns unknown

Generated using TypeDoc