@ipregistry/client
    Preparing search index...

    Type Alias SelectedFields<T, F>

    SelectedFields: string extends F ? T : Simplify<SelectedPaths<T, F>>

    Narrows a lookup response type to the fields named by a fields selection expression, including nested (dotted) paths. SelectedFields<IpInfo, 'location.region'> is { location: { region: Region } }, so accessing an unselected field such as location.city is a compile-time error. Comma-separated selections are merged: 'location.region,location.city' yields { location: { region: Region; city: string | null } }. Paths that traverse arrays narrow the element type. Unknown path segments contribute nothing to the result. When the expression is not a literal type (a plain string), the full response type is kept.

    Type Parameters

    • T
    • F extends string