Extend interfaces in Typescript
· ☕ 2 min read
Interface an interface. If that doesn’t excite you, I don’t know what will.
We have seen interfaces used as types before. But as our God Goop says - “abstract; (while && when) you can;”. So, we are here to know about interfaces for interfaces.
Consider this simple example -
1 2 3 interface Borg { name: string; } Now, any class implementing the interface Borg will have a name attribute.