Skip to content

Type Alias: InferMaxmindEdition<Config>

ts
type InferMaxmindEdition<Config> = Config["edition"] extends GeoIP2Country
  ? CountryResponse
  : Config["edition"] extends GeoLiteCountry
    ? CountryResponse
    : Config["edition"] extends GeoIP2City
      ? CityResponse
      : Config["edition"] extends GeoLiteCity
        ? CityResponse
        : never;

A utility type that infers the MaxMind response type based on the specified edition in the configuration. If the edition is not specified or does not match any known editions, it resolves to never.

Type Parameters

Type Parameter
Config extends AdonisMaxmindConfig