Vishesh Duggar bio photo

Vishesh Duggar

CTO Software @vamstar. 15 years in tech. Entrepreneurial with a keen interest in product development and usability. Interested in working on high impact ideas.

Subscribe to my mailing list

Are you looking for a tech advisor or a CTO?

Contact on LinkedIn

Vamstar LinkedIn Twitter Github

How do you check in typescript if variable is an instance of interface?

Since types are not available at runtime typescript allows you to define type checks that you could use at runtime like:

interface Keyboard {
    keys: number;

function instanceOfKeyboard(object: any): object is Keyboard {
    return 'keys' in object;

const kb = { keys: 5 }
if (instanceOfKeyboard(kb)) {

Close to 15 years in tech; I've served as a CTO and advisor to multiple organizations. Brought close to 20 products to market. As a founding member of multiple organizations I've done everything from tech to stratgey, sales, marketing, hiring, accounting and more. Experience in a variety of technologies including but not limited to AWS, Node, React, Serverless, ElasticSearch, Groovy, Java, Typescript, Angular, Grails, PHP, Drupal, Wordpress.

Always interested in looking at new tech, strategy and ways I can add value to organizations.

[Contact me.](