MCP Server Framework - v1.0.0
    Preparing search index...
    • Retrieve the validated data for a registered config section.

      Returns undefined if:

      • The section was not present in the config file
      • Config has not been loaded yet

      Type Parameters

      • T = unknown

      Parameters

      • name: string

        Section name (case-insensitive)

      Returns T | undefined

      The validated section data, or undefined

      interface MyAppConfig {
      url: string;
      timeout_ms?: number;
      }
      const config = getAppConfig<MyAppConfig>('myapp');
      if (config) {
      console.log(config.url);
      }