DefaultLoader class

A default loader for deserializing configuration objects.

Constructors

DefaultLoader(ResourceExplorer)

Intializes an instance of DefaultLoader.

Methods

load(Record<string, unknown>, Newable<Configurable>)

The method that loads the configuration object to a requested type.

Constructor Details

DefaultLoader(ResourceExplorer)

Intializes an instance of DefaultLoader.

new DefaultLoader(_resourceExplorer: ResourceExplorer)

Parameters

_resourceExplorer
ResourceExplorer

The ResourceExplorer used by the loader.

Method Details

load(Record<string, unknown>, Newable<Configurable>)

The method that loads the configuration object to a requested type.

function load(config: Record<string, unknown>, type: Newable<Configurable>): Configurable

Parameters

config

Record<string, unknown>

The configuration object to deserialize.

type

Newable<Configurable>

The object type that the configuration will be deserialized to.

Returns

Configurable

A Configurable object created from the configuration.