GeoLeaf Core API - v3.0.0
    Preparing search index...

    Minimal read-only interface to the GeoLeaf configuration system.

    Modules that implement ICoreModule receive an IGeoLeafConfig in their init() call. They should use get() / getAll() to read settings rather than importing the full GeoLeafConfig type, which would create a direct coupling to the config module internals.

    const theme = config.get<string>('ui.theme', 'light');
    const allSettings = config.getAll();
    interface IGeoLeafConfig {
        get(key: string): unknown;
        get<T = unknown>(key: string, defaultValue: T): T;
        getAll(): Record<string, unknown>;
        isLoaded(): boolean;
    }
    Index

    Methods

    • Returns the value associated with the given dot-notation key. Returns undefined if the key does not exist.

      Parameters

      • key: string

        Dot-notation config key (e.g. 'ui.theme', 'map.zoom').

      Returns unknown

    • Returns the value associated with the given dot-notation key, falling back to defaultValue when the key is absent or undefined.

      Type Parameters

      • T = unknown

      Parameters

      • key: string

        Dot-notation config key.

      • defaultValue: T

        Value returned when the key is not found.

      Returns T

      const zoom = config.get<number>('map.zoom', 12);
      
    • Returns a shallow snapshot of the entire resolved configuration object. Callers must not mutate the returned record.

      Returns Record<string, unknown>

    • Returns true once the configuration has been fully loaded and resolved. ICoreModule.init() is guaranteed to be called only after isLoaded() returns true.

      Returns boolean