// Copyright (c) Dolittle. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. type RecursiveReadModelField = T extends (infer U)[] ? RecursiveReadModelField : T extends object ? P | `${P}.${ReadModelField}` : P; /** * Defines the fields of a read model type. */ export type ReadModelField = ({ [TKey in keyof T & string]: T[TKey] extends Function ? never : RecursiveReadModelField; })[ keyof T & string];