Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IConfigurable

An interface to set configuration parameters to an object.

It can be added to any existing class by implementing a single configure() method.

If you need to emphasis the fact that configure() method can be called multiple times to change object configuration in runtime, use IReconfigurable interface instead.

see

ConfigParams

Example

export class MyClass implements IConfigurable {
    private _myParam: string = "default value";

    public configure(config: ConfigParams): void  {
        this._myParam = config.getAsStringWithDefault("options.param", myParam);
        ...
    }
}

Hierarchy

Index

Methods

Methods

configure

  • Configures component by passing configuration parameters.

    Parameters

    Returns void

Generated using TypeDoc