return the first complete definition of type 'name

def type(self, name: str):
        """return the first complete definition of type 'name'"""
        for f in self.body:
            if (hasattr(f, '_ctype')
                    and f._ctype._storage == Storages.TYPEDEF
                    and f._name == name):
                return f