What is duck typing in TypeScript?

Chandrashekhar Garkal
Chandrashekhar Garkal

Posted On: Feb 27, 2020

 

Duck-typing used to check the type compatibility for more complex variable types in typescript. This method checks the type matching between two objects. If the property contains more or less or not match then a compile-time error occurred.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Typescript Interview Questions

    What is Typescript?

    Typescript is a free and open-source programming language which is designed and developed by Microsoft. It was designed ..

    Typescript Interview Questions

    List some features of Typescript?

    Features of Typescript are:- Typescript can be compiled to all major versions of Javascript(ES3,ES5,ES6,ES7). Typescrip..

    Typescript Interview Questions

    List some benefits of using Typescript?

    Following are some benefits of using Typescript One of the biggest advantages of Typescript is its code completion and ..