Visit complete TypeScript roadmap

← Back to Topics List

Interface

TypeScript allows you to specifically type an object using an interface that can be reused by multiple objects.

interface Person {
  name: string;
  age: number;
}

function greet(person: Person) {
  return 'Hello ' + person.name;
}

Learn more from the following links:

Roadmaps Guides Videos About YouTube

roadmap.sh by Kamran Ahmed

Community created roadmaps, articles, resources and journeys to help you choose your path and grow in your career.

© roadmap.sh · FAQs · Terms · Privacy