• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • latest /
      • Kipper API /
      • Module /
      • @kipper/config /
      • config
    Kipper Docs
    • next
    • latest
    • 0.11.0
    • 0.10.4
    • 0.9.2
    • Overview

    • Quickstart

    • Goals for Kipper

    • Supported platforms

    • Usage Examples

      • Overview

      • Type Consistency

      • Runtime Type Casting

      • Strict Compiler Inspection

      • Integrated Runtime Library

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Tangled Expression

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Bitwise Expression

      • Relational Expressions

      • Convert Or Cast Expression

      • F-String Expression

      • Member Access Expression

      • Function Call Expression

      • Lambda Expression

      • Matches Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Interfaces

    • Classes

    • Comments

    • Built-in Functions

      • Overview

      • Compiler Setup

        • Overview

          • index

          • compiler

          • errors

          • logger

          • utils

          • config

          • index

          • index

        • Overview

        • new

        • run

        • compile

        • help

        • version

      • latest /
      • Kipper API /
      • Module /
      • @kipper/config /
      • config
    • latest /
    • Kipper API /
    • Module /
    • @kipper/config /
    • config

    Edit page

    Class: ConfigInterpreter<SchemeT, OutputT>

    An abstract class that interprets a configuration file and returns a configuration object.

    Since

    0.11.0

    Type parameters

    Name Type
    SchemeT extends ConfigInterpreterScheme
    OutputT OutputT

    Hierarchy

    • ConfigInterpreter

      ↳ KipperConfigInterpreter

    Table of contents

    Constructors

    • constructor

    Properties

    • scheme

    Methods

    • checkType
    • loadConfig
    • validateConfigBasedOffScheme
    • validateConfigBasedOffSchemeRecursive

    Constructors

    constructor

    • Protected new ConfigInterpreter<SchemeT, OutputT>(scheme)

    Type parameters

    Name Type
    SchemeT extends ConfigInterpreterScheme
    OutputT OutputT

    Parameters

    Name Type
    scheme SchemeT

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:91

    Properties

    scheme

    • scheme: SchemeT

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:89

    Methods

    checkType

    ▸ Private checkType(schemeValue, configValue, key, meta): void

    Parameters

    Name Type
    schemeValue ConfigInterpreterSchemeDefinition
    configValue any
    key string
    meta ConfigErrorMetaData

    Returns

    void

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:151


    loadConfig

    ▸ Abstract loadConfig(config): Promise<OutputT>

    Parameters

    Name Type
    config ConfigFile

    Returns

    Promise<OutputT>

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:203


    validateConfigBasedOffScheme

    ▸ Protected validateConfigBasedOffScheme(rawConfig, meta, parentConfig?): void

    Validate a configuration file based off a scheme.

    This is intended for basic validation, and should not be used for complex validation. There a custom validation methods should be implemented depending on the complexity of the configuration file.

    Throws

    ConfigValidationError If the configuration file is invalid.

    Since

    0.11.0

    Parameters

    Name Type Description
    rawConfig Object The configuration file to validate.
    meta ConfigErrorMetaData The metadata for any error that may be thrown.
    parentConfig? RawEvaluatedKipperConfigFile The parent configuration file of the configuration file. If provided any required errors will be ignored if the parent configuration file has the required field.

    Returns

    void

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:108


    validateConfigBasedOffSchemeRecursive

    ▸ Private validateConfigBasedOffSchemeRecursive(configFile, scheme, meta, parentConfig?): void

    Raw recursive function to validate a configuration file based off a scheme.

    Throws

    ConfigValidationError If the configuration file is invalid.

    Since

    0.11.0

    Parameters

    Name Type Description
    configFile Object The configuration file to validate.
    scheme ConfigInterpreterScheme The scheme to validate the configuration file against.
    meta ConfigErrorMetaData The metadata for any error that may be thrown.
    parentConfig? RawEvaluatedKipperConfigFile The parent configuration file of the configuration file. If provided any required errors will be ignored if the parent configuration file has the required field.

    Returns

    void

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:127

  • Developed at:

    • Releases
    • GitHub
    • Security
    • Issue Tracker
    • License
  • Copyright © 2021-2026 Luna Klatzer, 2024-2025 Lorenz Holzbauer & Fabian Baitura.
    Kipper is licensed under the GPL-3.0-or-later license.