Added more precise abstraction of interfaces
Fill in more TypeScript definitions