This page is a good example of when Typescript is both unnecessary and off-putting, based on the content's purpose.

The author is trying to demonstrate a problem and the proposed solution, using example code that the reader then needs to read, formulate a visual "structure" in their mind, and then apply that structure to the subsequent code.

Typescript is not in any way invalid here, and as a tool when programming something that will run in the real-world, can be invaluable.

However, when writing anything you want someone to deeply comprehend, you want to use the least amount of text needed to get your point across. Adding types don't serve any purpose here. The types used are generics, which tell you nothing specific, hence the name, and the names given to the functions and object properties are enough to convey what this code is doing.