Add missing type hints to `synapse.app`.