API REFERENCE

GridPathValue

Fields, allowed values, and APIs that use GridPathValue.

Type definition

A question mark (?) marks an optional field; readonly marks a value you should not change directly. A union (|) accepts one of the listed forms. Functions are callbacks that Grid invokes at the relevant point.

typescript
export type GridPathValue<TData, TPath extends string> =
  TPath extends keyof TData
    ? TData[TPath]
    : TPath extends `${infer Head}.${infer Tail}`
      ? Head extends keyof TData
        ? GridPathValue<NonNullable<TData[Head]>, Tail>
        : unknown
      : unknown;

Contracts containing this type