implements
A class can promise to follow an interface with implements.
Example
interface Speaker { speak(): string }
class Cat implements Speaker { speak() { return "meow"; } }
console.log(new Cat().speak());Result
meow
Exercise
Follow an interface.
class A I {}
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.