typescript 2.8 - Conditional Type

Conditional Type

Which basically trying to say if  type A kinda like B type, then we can just use C type.

interface Car {
drive(): void; } interface Ferarri extends Car { drivefaster(): void; } // Foo becomes number type Foo = Ferarri extends Car ? number : string;


Popular posts from this blog

Solving Sonarqube :- Project was never analyzed. A regular analysis is required before a branch analysis

PySpark - Working with JDBC Sqlite database