It's definitely possible (just as easy in fact). You just need to define a schema for each API endpoint. TypeScript does not physically protect you from having to enumerate all the properties and size constraints of the data one by one. In terms of the actual schema validation step, there are lots of tools in JavaScript which let you do the same thing; ajv, z-schema are just a couple of examples.
My point is that TS adds no value there. TS's value is only in static type checking. What the article is claiming is that TS somehow adds value with runtime type checking.
The argument of saying that "TypeScript adds value because it can reuse its internal type definitions for the purpose of validating remote input" is circular - It refers to a problem which doesn't exist in JavaScript to begin with.
JavaScript has no type definitions so being unable to reuse type definitions for schema validation does not qualify as a drawback on its part. The argument simply does not apply and cannot be used to claim TS's superiority.
At best you could claim that TypeScript cancels out one of its own shortcomings:
- TS shortcoming: You need to define types everywhere... That adds a lot of work! (-1 point)
- TS benefit: But you can re-use these type definitions for doing schema validation of user input as well! That saves a lot of work! (+1 point)
But the net gain over JS is 0 because:
- JS shortcoming: You need to define a schema for all your endpoints to validate user input... That adds a lot of work! (-1 point)
- JS benefit: But aside from that, you don't need to define types anywhere... So that saves you a lot of work. (+1 point)
The only real argument to be had is whether or not compile-time static typing adds value over dynamic typing.