This transfers the current state of `TypeVisitor` from the proof-of-concept.
This transfers the current state of `DeclVisitor` from the proof-of-concept. TODO: make the `declarations` tests in `extractor-tests` more comprehensive.