Core - v1.0.0
    Preparing search index...

    Function configure

    • Registers the configuration surface this process runs on.

      Call once at startup, before anything resolves a setting. Everything downstream reads it back through resolve.

      Type Parameters

      • C extends object

        The assembled configuration surface.

      Parameters

      • defaults: C

        Every module's settings before any override applies.

      • overrides: Overrides<C> = {}

        Partial per-module overrides. Omit for defaults alone.

      Returns void

      The application assembles the surface, because it is the only layer that knows every half of it: this package supplies the runtime-neutral defaults, an adapter package supplies the platform-backed ones, and the application supplies the overrides. Nothing here cares which half a key came from, so supporting another platform means editing the application rather than this file.

      A second call replaces the surface rather than merging into it. That keeps a single call unambiguous, and gives a test a clean way to install a fixture.

      import { configure, systemDefaults } from '@bayudwiyansatria/core'
      import { platformDefaults } from '<the-adapter-package>'
      import { overrides } from 'config'

      configure({ ...systemDefaults, ...platformDefaults }, overrides)

      Bayu Dwiyan Satria

      1.0.0

      1.0.0