Skip to main content
API Reference / modelence / index / ConfigSchema
ConfigSchema = object
Defined in: packages/modelence/src/config/types.ts:81 Defines the configuration schema for a module. Each key becomes a namespaced config value accessible via getConfig('moduleName.key').

Example

import { Module } from 'modelence/server';

export default new Module('payments', {
  configSchema: {
    apiKey: {
      type: 'secret',
      default: '',
      isPublic: false,
    },
    currency: {
      type: 'string',
      default: 'USD',
      isPublic: true,
    },
  },
});

Index Signature

[key: string]: ConfigParams<ConfigType, boolean>