Function isPropertyPath

  • Determines whether a value is a valid property path.

    A valid path is either:

    • A non-empty dotted string.
    • A non-empty readonly array containing only string, number, or symbol property keys.

    This function validates the property path representation only. Numeric array-index constraints are evaluated during traversal because whether a numeric key is required depends on the value reached at runtime.

    Parameters

    • value: unknown

      Value to validate.

    Returns value is PropertyPath

    Whether the value is a valid PropertyPath.