**Describe the refactoring action** Add more type annotations. **Expected benefit** More type-safety. Better linting.