Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Interface

3 tags 1 category

In object-oriented programming, an interface describes the set of properties and methods that an object exposes. An object that implements an interface can be handled correctly when passed to functions or constructs designed to interoperate with such interfaces. Usually, an interface is treated as a contract: other than the behavior of these properties and methods, objects implementing the same interface may not be related in any way at runtime.

The JavaScript language itself defines some interfaces, such as iterable, thenable, and disposable, which interoperate with language constructs such as spreading, await, and using. Due to the lack of compilation or static type checking, these contracts are not embodied by any language constructs, so MDN also refers to them as “protocols”.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…