Design configuration interfaces to be flexible and extensible rather than overly specific. When creating configuration objects:

  1. Make configuration parameters optional when possible with sensible defaults
  2. Allow for arbitrary additional properties rather than creating specific fields for custom configurations

Example - Instead of this:

export interface AxiosRequestConfig<D = any> {
  // other properties...
  customConfig?: Record<string, any>;
}

// Required configuration parameter
getUri(config: AxiosRequestConfig): string;

Do this:

export interface AxiosRequestConfig<D = any> {
  // other properties...
  [key: string]: any; // Allow arbitrary properties
}

// Optional configuration parameter
getUri(config?: AxiosRequestConfig): string;

This approach allows consumers to extend configurations naturally without requiring interface changes for each new use case, while maintaining backward compatibility through sensible defaults.