INNER CODE UNIT · TypeScript

getConfigSchema

modelence/modelence · packages/modelence/src/app/index.ts:312

function getConfigSchema(modules: Module[]): ConfigSchema {
  const merged: ConfigSchema = {};

  for (const module of modules) {
    for (const [key, value] of Object.entries(module.configSchema)) {
      const absoluteKey = `${module.name}.${key}`;
      if (absoluteKey in merged) {
        throw new Error(`Duplicate config schema key: ${absoluteKey} (${module.name})`);
      }

      merged[absoluteKey] = value;
    }
  }

  return merged;
}

function defineCronJobs(modules: Module[]) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…