Firstly, I send "rays of goodness" to those two who gave a minus to a perfectly reasonable question
Secondly, a solution was found for both issues: yes, @types/diff should be removed, it's defective, and a custom declaration should be made, and the global namespace is now configured differently: answer here