---
title: "Comment by Daniel Rodríguez Rivero on \"The Untapped Power of Interfaces in TypeScript - Create Modular Code with Interfaces\" | Hashnode"
description: "Interfaces are specific and explicit to OOP. Are you serious?"
url: "https://hashnode.com/posts/the-untapped-power-of-interfaces-in-typescript-create-modular-code-with-interfaces/65a07e839be50869ea94d3db/comment/65a18884c63538b8b26fa491"
---

[Discussion](https://hashnode.com/posts/the-untapped-power-of-interfaces-in-typescript-create-modular-code-with-interfaces/65a07e839be50869ea94d3db)

Comment [The Untapped Power of Interfaces in TypeScript - Create Modular Code with Interfaces](https://hashnode.com/posts/the-untapped-power-of-interfaces-in-typescript-create-modular-code-with-interfaces/65a07e839be50869ea94d3db)

[Daniel Rodríguez Rivero](https://hashnode.com/@danielo515)

[Jan 12, 2024](https://hashnode.com/posts/the-untapped-power-of-interfaces-in-typescript-create-modular-code-with-interfaces/65a07e839be50869ea94d3db/comment/65a18884c63538b8b26fa491)

> Interfaces are specific and explicit to OOP.

Are you serious?

[Mark Maksi](https://hashnode.com/@markmaksi)

[Jan 13, 2024](https://hashnode.com/posts/the-untapped-power-of-interfaces-in-typescript-create-modular-code-with-interfaces/65a07e839be50869ea94d3db/comment/65a18884c63538b8b26fa491#reply-65a2119cd5f909135303abd0)

Thanks for pointing that out. I updated the context to make my idea more clear:

> In JavaScript, we have 2 main paradigms: functional programming, and object-oriented programming. Interfaces are specific and explicit to OOP and cannot be used in functional programming.

[Daniel Rodríguez Rivero](https://hashnode.com/@danielo515)

[Jan 14, 2024](https://hashnode.com/posts/the-untapped-power-of-interfaces-in-typescript-create-modular-code-with-interfaces/65a07e839be50869ea94d3db/comment/65a18884c63538b8b26fa491#reply-65a3b528bff466fe2ffb902e)

[Mark Maksi](https://hashnode.com/@markmaksi) because you updated your article, I am assuming you are not joking. Interfaces can, and are used in functional programming. Interfaces and classes are a nice way to group behaviours, and that is not exclusive to OOP

[Mark Maksi](https://hashnode.com/@markmaksi)

[Jan 14, 2024](https://hashnode.com/posts/the-untapped-power-of-interfaces-in-typescript-create-modular-code-with-interfaces/65a07e839be50869ea94d3db/comment/65a18884c63538b8b26fa491#reply-65a3b80e54f1206b72e48948)

[Daniel Rodríguez Rivero](https://hashnode.com/@danielo515) I updated the post because I don’t want my readers to think that interfaces are exclusive to TypeScript.

How can Interfaxes be used in functional programming other than defining types for objects? Can you show me an example in a code snippet?

[Daniel Rodríguez Rivero](https://hashnode.com/@danielo515)

[Jan 15, 2024](https://hashnode.com/posts/the-untapped-power-of-interfaces-in-typescript-create-modular-code-with-interfaces/65a07e839be50869ea94d3db/comment/65a18884c63538b8b26fa491#reply-65a4dcace0bc534a22d4cc9d)

[Mark Maksi](https://hashnode.com/@markmaksi) interfaces allow some type definitions that are not possible in plain types. Not sure what is in your mind, but ojects and classes are not exclusive to OOP. In FP classes can be used to model/group behaviour, without attaching any data to it. Option, Either are defined using interfaces that any class can implement. Here you have an example: [github.com/gcanti/fp-ts/blob/master/src/Option.ts](https://github.com/gcanti/fp-ts/blob/master/src/Option.ts)
