> TypeScript is a typed superset of JavaScript that compiles to plain JavaScript
This means that all JavaScript syntax and features are supported in TypeScript. It doesn't mean that all JavaScript is valid TypeScript - such a meaning would be ad absurdum, it would invalidate the entire point of TypeScript: additional type safety.