Utility type to infer connection types from a configuration object.
Configuration object with connections property
const config = { connections: { main: { host: 'localhost', port: 6379 }, cache: { host: 'cache', port: 6380 } }}type Connections = InferConnections<typeof config> // { main: {...}, cache: {...} } Copy
const config = { connections: { main: { host: 'localhost', port: 6379 }, cache: { host: 'cache', port: 6380 } }}type Connections = InferConnections<typeof config> // { main: {...}, cache: {...} }
Utility type to infer connection types from a configuration object.