# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/15_dict.ipynb.

# %% auto 0
__all__ = ['isdictkeys', 'isdictvalues', 'isdictitems', 'isdkeys', 'isdvals', 'isditems', 'isdictiter', 'isdicttype', 'isditer']

# %% ../nbs/15_dict.ipynb 4
from _collections_abc import dict_keys, dict_values, dict_items
from typing import TypeGuard
from typing import Union

# %% ../nbs/15_dict.ipynb 6
def isdictkeys(x) -> TypeGuard[dict_keys]:
    '''Check if `x` is a `dict_keys`.
    
    See Also
    --------
    isdkeys : Alias for `isdictkeys`.
    '''
    return isinstance(x, dict_keys)

def isdictvalues(x) -> TypeGuard[dict_values]:
    '''Check if `x` is a `dict_values`.
    
    See Also
    --------
    isdvals : Alias for `isdictvalues`.
    '''
    return isinstance(x, dict_values)

def isdictitems(x) -> TypeGuard[dict_items]:
    '''Check if `x` is a `dict_items`.
    
    See Also
    --------
    isditems : Alias for `isdictitems`.
    '''
    return isinstance(x, dict_items)


def isdkeys(x) -> TypeGuard[dict_keys]:
    '''Check if `x` is a `dict_keys`.
    
    See Also
    --------
    isdictkeys : Alias for `isdkeys`.
    '''
    return isdictkeys(x)

def isdvals(x) -> TypeGuard[dict_values]:
    '''Check if `x` is a `dict_values`.
    
    See Also
    --------
    isdictvalues : Alias for `isdvals`.
    '''
    return isdictvalues(x)

def isditems(x) -> TypeGuard[dict_items]:
    '''Check if `x` is a `dict_items`.
    
    See Also
    --------
    isdictitems : Alias for `isditems`.
    '''
    return isdictitems(x)


def isdictiter(x) -> TypeGuard[Union[dict_keys, dict_values, dict_items]]:
    '''Check if `x` is a `dict_keys`, `dict_values`, or `dict_items`.
    
    See Also
    --------
    isditer : Alias for `isdictiter`.
    isdicttype : Alias for `isdictiter`.
    '''
    return isdictkeys(x) or isdictvalues(x) or isdictitems(x)

def isdicttype(x) -> TypeGuard[Union[dict_keys, dict_values, dict_items]]:
    '''Check if `x` is a `dict_keys`, `dict_values`, or `dict_items`.
    
    See Also
    --------
    isdictiter : Alias for `isdicttype`.
    '''
    return isdictiter(x)


def isditer(x) -> TypeGuard[Union[dict_keys, dict_values, dict_items]]:
    '''Check if `x` is a `dict_keys`, `dict_values`, or `dict_items`.
    
    See Also
    --------
    isdictiter : Alias for `isditer`.
    isdicttype : Alias for `isdictiter`.
    '''
    return isdictiter(x)
