Type alias Path<T, N>

Path<T, N>: {
    [K in Field<T>]: N extends {
            length: 5;
        }
        ? never
        : Required<T>[K] extends ((...args) => any)
            ? never
            : Required<T>[K] extends Model<infer I> | Model<infer I>[]
                ? `${K}.${Path<I, [...N, string]>}`
                : K
}[Field<T>]

Mapped type to compile strongly typed property Paths of classes extending the abstract Model base class, while providing intellisense.

Type Parameters

  • T extends Model

    The extending Model InstanceType.

  • N extends string[] = []

    A string array type used to determine recursive depth.

Generated using TypeDoc