O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hybrid type interface

Hybrid type interfaces are used when we want to use an object both as a function and as an object. We can call an object like a function if it implements a hybrid type interface, or we can use it as an object and access its properties. This type of interface enables you to use an interface as an object and a function, as illustrated:

interface Customer {     (name: string): string;     name: string;     deleteCustomer(id: number): void; } let c: Customer; c('Rajesh Gunasundaram'); c.name = 'Rajesh Gunasundaram'; c.deleteCustomer(101); 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required