def object_keys_operation(value: ObjectVar):
    """Get the keys of an object.

    Args:
        value: The object to get the keys from.

    Returns:
        The keys of the object.
    """
    if not types.is_optional(value._var_type):
        return var_operation_return(
            js_expression=f"Object.keys({value})",
            var_type=list[str],
        )
    return var_operation_return(
        js_expression=f"((value) => value ?? undefined === undefined ? undefined : Object.keys(value))({value})",
        var_type=(list[str] | None),
    )
Get the keys of an object.

    Args:
        value: The object to get the keys from.

    Returns:
        The keys of the object.
    
reflex/vars/object.py