misc var improvements (#4068)

This commit is contained in:
Khaleel Al-Adhami 2024-10-07 09:37:44 -07:00 committed by GitHub
parent 47230198bb
commit 7cd5c904cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -119,6 +119,8 @@ class ObjectVar(Var[OBJECT_TYPE]):
"""
return object_entries_operation(self)
items = entries
def merge(self, other: ObjectVar):
"""Merge two objects.

View File

@ -884,6 +884,12 @@ class ArrayVar(Var[ARRAY_VAR_TYPE]):
i: int | NumberVar,
) -> ArrayVar[Set[INNER_ARRAY_VAR]]: ...
@overload
def __getitem__(
self: ARRAY_VAR_OF_LIST_ELEMENT[Tuple[KEY_TYPE, VALUE_TYPE]],
i: int | NumberVar,
) -> ArrayVar[Tuple[KEY_TYPE, VALUE_TYPE]]: ...
@overload
def __getitem__(
self: ARRAY_VAR_OF_LIST_ELEMENT[Tuple[INNER_ARRAY_VAR, ...]],