Reputation: 16115
Does typescript have a standard type which is the empty interface? As opposed to any
, the type should result in type errors whenever you try to do anything with it - except cast it to a real type/any.
I know you can define it trivially, I just wondered if its already defined by the language.
interface untyped {}
Upvotes: 2
Views: 150
Reputation: 220884
The empty type in TypeScript is called {}
There are no built-in aliases for it.
Upvotes: 4