Type alias PathBuilder<T, C, U>

PathBuilder<T, C, U>: Exclude<C, undefined> extends never
    ? ((data) => Path<U>)
    : ((data, context) => Path<U>)

A function with which a property path can be constructed using dot-notation.

Example

The following corresponds to /members/0/msg:

(data) => data.members[0].msg

Relative paths are supported through the context argument:

(_, context) => context.contact.email

corresponds to the relative path contact/email.

Type Parameters

  • T

    The type of the model data.

  • C

    The type of the context data.

  • U

    The type of the selected property.

Generated using TypeDoc